TC and "unremovable" files

English support forum

Moderators: white, Hacker, petermad, Stefan2

Post Reply
User avatar
slon
Junior Member
Junior Member
Posts: 17
Joined: 2003-02-28, 18:23 UTC

TC and "unremovable" files

Post by *slon »

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
User avatar
Aezay
Senior Member
Senior Member
Posts: 269
Joined: 2003-02-12, 07:27 UTC
Location: Denmark
Contact:

Post by *Aezay »

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$.
Of all the planets I've been to, this one is my favorite.
User avatar
Valentino
Power Member
Power Member
Posts: 706
Joined: 2003-02-07, 00:21 UTC
Location: Ukraine

Post by *Valentino »

On what OS did you manage to make these wonders?
pgriffet
Junior Member
Junior Member
Posts: 67
Joined: 2003-03-01, 22:04 UTC
Location: Belgium

Post by *pgriffet »

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. :D

I use Total Commander 5.50 on Win98 (First) and IE 5.5. YMMV.
User avatar
ben hub
Member
Member
Posts: 132
Joined: 2003-02-06, 21:47 UTC
Location: Madagascar

Post by *ben hub »

I use Total Commander 5.50
You should upgrade to TC 5.51 :wink:
Benoît
# 4081
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48232
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

"myfile.txt .\"
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.
Author of Total Commander
https://www.ghisler.com
pgriffet
Junior Member
Junior Member
Posts: 67
Joined: 2003-03-01, 22:04 UTC
Location: Belgium

Post by *pgriffet »

Salut Benoît. Pareil avec TC 5.51
User avatar
Valentino
Power Member
Power Member
Posts: 706
Joined: 2003-02-07, 00:21 UTC
Location: Ukraine

Post by *Valentino »

2ghisler(Author)
But why editor can read such files (although cannot write) and lister can't?
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48232
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Hmm, no idea - I will check it.
Author of Total Commander
https://www.ghisler.com
tweakme
Junior Member
Junior Member
Posts: 5
Joined: 2003-04-16, 17:14 UTC

Re: TC and "unremovable" files

Post by *tweakme »

slon 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
* Press in TC the [F4] button to view/edit it :twisted:

* Delete the un-deleteable file with DOS-command: "del myfile.*" ; i know, not very save if there are other files starting with "myfile...." :twisted:

* or... a better way is: DIR /x and then delete the right file :wink:
Post Reply