TC and "unremovable" files
Moderators: white, Hacker, petermad, Stefan2
TC and "unremovable" files
Lets say, you want to make my file unremovable. To do this just rename it like this - add space, period, slash, space,slash
For example myfile.txt becomes myfile.txt .\ \
Even Notepad can open it, edit and save. But you cannot delete it.
However neither TC nor Lister can even view it!
Just curious - is it possible in TC at least to view it? Ideally it would be nice, if TC can delete such files.
If you are an ftp owner and allow anonymous access, you will see these files on your ftp very often, and there is nothing you can do about it! It sits on your disk, eats your space and there is no way to delete it!
The same goes for undeletable dfirectories, such as \com1 \lpt1 .~temp
For example myfile.txt becomes myfile.txt .\ \
Even Notepad can open it, edit and save. But you cannot delete it.
However neither TC nor Lister can even view it!
Just curious - is it possible in TC at least to view it? Ideally it would be nice, if TC can delete such files.
If you are an ftp owner and allow anonymous access, you will see these files on your ftp very often, and there is nothing you can do about it! It sits on your disk, eats your space and there is no way to delete it!
The same goes for undeletable dfirectories, such as \com1 \lpt1 .~temp
I couldn't rename a file to "myfile.txt .\ \" but I could rename it to "myfile.txt .\" which gives me the same result as u describe. I tried if Explorer/Notepad could handle the file, they couldn't on WinXP Pro SP1.
If u're still sitting there with unremovable files, don't worry, just disable long file names in the settings, and you can delete the files.
I don't think u can blame this on Christian, more likely M$.
If u're still sitting there with unremovable files, don't worry, just disable long file names in the settings, and you can delete the files.
I don't think u can blame this on Christian, more likely M$.
Of all the planets I've been to, this one is my favorite.
Hi Slon,
I've tried to rename a file (with TC) the way you did, adding space, period, slash, space,slash (actually, I've put backslash as you showed). The first time, nothing happens. No rename, no error message, the file name is still myfile.txt. Then, I've tried again a few seconds later and the result was surprising, the filename was something like this : «||_v||_ without extension. I couldn't view or open the file with TC but when I've tried to delete the file, it screwed up the folder name where the file was located !
The folder was renamed with such a strange name and I couldn't open/delete the folder with TC or Explorer (it says : impossible de supprimer fichier : erreur système de fichier 1026, I own a French Windows).
I had a lot of files in this folder and with Drive Rescue, I could find them back and copy them to another drive, while the files weren't seen as deleted files. Hopefully, Drive Rescue uses another way to access folders, maybe a raw mode, I don't know.
Actually, the solution is to run scandiskw which will give an error with such files/folder name and ask to repair or delete.
Slon, what is your Windows version ? Did you rename the file with Explorer ? I was not able to do it, only TC allows to rename it. Explorer says "cannot use / \ in filename". That's maybe a flaw in TC, I don't know. It should not be possible to rename a file while bypassing MS rules because you will have problems with this file soon or later.
As for the unremovable files you mention, it's a MS limitation because those names are seen as reserved. It's the same for CON, AUX, and so on. So I think TC can't delete them for the same reason as Explorer.
Aezay, disabling long file names didn't the trick with such strange characters.
Maybe if you try twice, you will also be able to rename the same way as Slon and to have the strange behaviour under XP. Be careful with your folder if it contains important files.![Very Happy :D](./images/smilies/icon_biggrin.gif)
I use Total Commander 5.50 on Win98 (First) and IE 5.5. YMMV.
I've tried to rename a file (with TC) the way you did, adding space, period, slash, space,slash (actually, I've put backslash as you showed). The first time, nothing happens. No rename, no error message, the file name is still myfile.txt. Then, I've tried again a few seconds later and the result was surprising, the filename was something like this : «||_v||_ without extension. I couldn't view or open the file with TC but when I've tried to delete the file, it screwed up the folder name where the file was located !
The folder was renamed with such a strange name and I couldn't open/delete the folder with TC or Explorer (it says : impossible de supprimer fichier : erreur système de fichier 1026, I own a French Windows).
I had a lot of files in this folder and with Drive Rescue, I could find them back and copy them to another drive, while the files weren't seen as deleted files. Hopefully, Drive Rescue uses another way to access folders, maybe a raw mode, I don't know.
Actually, the solution is to run scandiskw which will give an error with such files/folder name and ask to repair or delete.
Slon, what is your Windows version ? Did you rename the file with Explorer ? I was not able to do it, only TC allows to rename it. Explorer says "cannot use / \ in filename". That's maybe a flaw in TC, I don't know. It should not be possible to rename a file while bypassing MS rules because you will have problems with this file soon or later.
As for the unremovable files you mention, it's a MS limitation because those names are seen as reserved. It's the same for CON, AUX, and so on. So I think TC can't delete them for the same reason as Explorer.
Aezay, disabling long file names didn't the trick with such strange characters.
Maybe if you try twice, you will also be able to rename the same way as Slon and to have the strange behaviour under XP. Be careful with your folder if it contains important files.
![Very Happy :D](./images/smilies/icon_biggrin.gif)
I use Total Commander 5.50 on Win98 (First) and IE 5.5. YMMV.
- ghisler(Author)
- Site Admin
- Posts: 48232
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
With this trick, you cause Windows to create a filename which ends in a space, which isn't normally allowed. The only way to access it is to switch to short file names and to rename the file."myfile.txt .\"
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
- ghisler(Author)
- Site Admin
- Posts: 48232
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Re: TC and "unremovable" files
* Press in TC the [F4] button to view/edit itslon wrote:Lets say, you want to make my file unremovable. To do this just rename it like this - add space, period, slash, space,slash
For example myfile.txt becomes myfile.txt .\ \
Even Notepad can open it, edit and save. But you cannot delete it.
However neither TC nor Lister can even view it!
Just curious - is it possible in TC at least to view it? Ideally it would be nice, if TC can delete such files.
If you are an ftp owner and allow anonymous access, you will see these files on your ftp very often, and there is nothing you can do about it! It sits on your disk, eats your space and there is no way to delete it!
The same goes for undeletable dfirectories, such as \com1 \lpt1 .~temp
![Twisted Evil :twisted:](./images/smilies/icon_twisted.gif)
* Delete the un-deleteable file with DOS-command: "del myfile.*" ; i know, not very save if there are other files starting with "myfile...."
![Twisted Evil :twisted:](./images/smilies/icon_twisted.gif)
* or... a better way is: DIR /x and then delete the right file
![Wink :wink:](./images/smilies/icon_wink.gif)