AKB Forums

Go Back   AKB Forums > Software and Hardware > Software
Home Register Blogs FAQ Members List Calendar Downloads Arcade Mark Forums Read

Software Вопросы по программному обеспечению

Troubles when posting message? Click here! :: Проблемы с отправлением сообщения? Нажмите сюда!

Reply
 
LinkBack Thread Tools Display Modes
Old Jan 11, 2004, 15:37   #1
Administrator
 
acid's Avatar
 
Join Date: Sep 2001
Location: Yerevan, Armenia
Posts: 7,069
Blog Entries: 15
Rep Power: 10
Reputation: 246
Lightbulb How to delete files with invalid file names

By Abby aka chaxid (Updated 10/03/2003)

How often have you downloaded something off of a peer-2-peer network, or maybe someone uploads something suspicious to your FTP server, and you end up with files that you just can't erase? It's a frustrating thing I have to say, since Windows gives you the most obnoxious error messages:

Error renaming file or folder

Cannot rename file: Cannot read from the source file or disk.

-or maybe-

Error deleting file or folder


Cannot delete file: Cannot read from the source file or disk.

These errors are caused by filenames being created that are not valid or are reserved by Windows. This is much different then a file simply being read-only or perhaps a system file, in which case you could use the "attrib" command to set the file so that it can be deleted.

attrib -s -h -r <filename>

Well you really don't have to put up with it. A Microsoft Knowledge Base Article shows you how you can delete these files quite easily. I'll cite some of the information in that article here, as it is the best solution to this problem. In fact, the entire problem can be addressed by issuing a simple command:

DEL \\.\driveletter:\path\filename
[ for files ]


or

RD \\.\<driveletter>:\<path>\<directory name>
[ for directories ]


If the filename is too long or complicated to disect, always remember that spaces in MS-DOS are denoted by a slash or " / ". That should solve the problem with very long file names that contain spaces. Or you could issue a wildcard statement that would just eliminate all files in the directory. The reason that the above commands work, rather than the standard explorer delete commands, is because they "bypass reverse-word checks". I'm not entirely familiar with reverse-word checks but I'd assume that it is the mechanism that checks for the validity of a filename before the file is manipulated or deleted.

Link: http://www.datiku.com/tutorials/wind..._win_files.htm
__________________
Chat with acid


acid is offline   Reply With Quote Quote selected
Old Jan 11, 2004, 15:56   #2
Грустно...
 
Agregat's Avatar
 
Join Date: Aug 2002
Location: Там, где всегда идут дожди
Posts: 21,386
Rep Power: 10
Reputation: 125
Send a message via ICQ to Agregat Send a message via MSN to Agregat
Использования Юникод имен?
Может не сработать по Окошки 95/98/Ме
__________________
Хотели, как лучше, а получилось даже хуже...
Лозунг шахматиста: На каждый шах - ответим матом!
В сумасшедшем доме каждый мог говорить все, что взбредет ему в голову, словно в парламенте.
Я. Гашек. "Приключения Бравого Солдата Швейка". Часть 1. Глава IV. Абзац 2.
Agregat is offline   Reply With Quote Quote selected
Old Jan 11, 2004, 16:06   #3
ЙЦУКЕН
 
Join Date: Jul 2002
Location: 0x68,0x69,0x72, 0x69,0x6e,0x67, 0x20,0x6e,0x6f, 0x77
Posts: 3,113
Rep Power: 7
Reputation: 10
Send a message via ICQ to nm
ндя .... виндовз - эта такая "вещь в себе"
nm is offline   Reply With Quote Quote selected
Old Jan 11, 2004, 16:09   #4
Administrator
 
greka's Avatar
 
Join Date: Sep 2001
Location: @work
Posts: 5,337
Rep Power: 10
Reputation: 23
Send a message via ICQ to greka
poleznyj post, vstrechalis' takie "neisstrebimye fayly"..
MS DOS spe**** na pomosh' , nm
__________________
И повешенные могут качаться в неположенную сторону. /С.Е.Лец/
greka is offline   Reply With Quote Quote selected
Old Jan 11, 2004, 18:44   #5
Administrator
 
acid's Avatar
 
Join Date: Sep 2001
Location: Yerevan, Armenia
Posts: 7,069
Blog Entries: 15
Rep Power: 10
Reputation: 246
Кстати у самого не получилось таким способом. Какой-то файл создал пкунзип, у которого никак не видать имени. И видать это не пробел. Удалить или переименовать ну никак не могу, входить получается. Эни айдиа?
__________________
Chat with acid


acid is offline   Reply With Quote Quote selected
Old Jan 12, 2004, 05:55   #6
Administrator
 
greka's Avatar
 
Join Date: Sep 2001
Location: @work
Posts: 5,337
Rep Power: 10
Reputation: 23
Send a message via ICQ to greka
Quote:
Originally Posted by acid
Кстати у самого не получилось таким способом. Какой-то файл создал пкунзип, у которого никак не видать имени. И видать это не пробел. Удалить или переименовать ну никак не могу, входить получается. Эни айдиа?
Winrar 2.8, Acid..
__________________
И повешенные могут качаться в неположенную сторону. /С.Е.Лец/
greka is offline   Reply With Quote Quote selected
Old Jan 12, 2004, 14:53   #7
Administrator
 
acid's Avatar
 
Join Date: Sep 2001
Location: Yerevan, Armenia
Posts: 7,069
Blog Entries: 15
Rep Power: 10
Reputation: 246
Quote:
Originally Posted by Greco El
Winrar 2.8, Acid..
Спасибо, твой совет мне очень помог
__________________
Chat with acid


acid is offline   Reply With Quote Quote selected
Old Jan 12, 2004, 21:49   #8
Administrator
 
acid's Avatar
 
Join Date: Sep 2001
Location: Yerevan, Armenia
Posts: 7,069
Blog Entries: 15
Rep Power: 10
Reputation: 246
Получилось ! Для этого нужно было убить explorer.exe, удалить файл у которого не было имени из коммандой строки и опять врубить ехплорер обратно Терд мерни гитутиун.
__________________
Chat with acid


acid is offline   Reply With Quote Quote selected
Old Jan 13, 2004, 07:45   #9
Administrator
 
greka's Avatar
 
Join Date: Sep 2001
Location: @work
Posts: 5,337
Rep Power: 10
Reputation: 23
Send a message via ICQ to greka
н-да, не успел, ну да ладно, может кому пригодится эта инфа
Тут совет, как не "убивать" Explorer, но завершить его культурным образом.

====== ====== ====== ====== ====== ====== ====== ======
1. Open a Command Prompt window and leave it open.

2. Close all open programs.

3. You now need to close EXPLORER.EXE. The proper way to shutdown Explorer is to raise the "Shut Down Windows" dialog (select "Shut Down..." from the start menu), hold down CTRL+SHIFT+ALT and press the CANCEL button. Explorer will exit cleanly.

Note: The <CTRL+ALT+DEL> at the 'Shut Down Windows' dialog method of closing Explorer is built into Explorer. (It was specifically designed so that developers writing Shell Extensions could get Explorer to release their Shell Extension DLLs while debugging them).

4. Go back to the Command Prompt window and change to the directory where the undeletable file is located in. At the command prompt type DEL <filename> where <filename> is the file you wish to delete.

5. Go back to Task Manager, click File, New Task and enter EXPLORER.EXE to restart the GUI shell. /tip by James R. Twine/
====== ====== ====== ====== ====== ====== ====== ======
__________________
И повешенные могут качаться в неположенную сторону. /С.Е.Лец/
greka is offline   Reply With Quote Quote selected
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT. The time now is 21:49.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
This board was founded on September 29, 2001
Powered by Viper Internet

Affordable Web Hosting | ParevNet

Buy text link