Forum Moderators: open

Message Too Old, No Replies

A filename that prevents a file from being deleted

On win32 plattform / ntfs

         

hakre

6:51 pm on Jun 8, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Just asking myself if it is possible to name a file in a specific way that it's read- and wideable but can't be deleted on winXP? Any ideas?

uncle_bob

11:11 pm on Jun 8, 2004 (gmt 0)

10+ Year Member



I doubt there is a filename that will prevent it from being deleted, but if you are using NTFS then you should be able to set the security permissions for the file or folder so it can't be deleted by certain/any user. Look under file properties -> security -> advanced -> change/edit (2k)

g1smd

8:58 pm on Jun 14, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



There are certain windows files, and even folders that can't be deleted.

There are several ways that they protect them.

bedlam

9:50 pm on Jun 15, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



If you can create a file or a folder with a SPACE as the last character (maybe first too, I'm not sure...), you will not be able to delete it in any simple way.

Of course you will not be able to open it either :-D

I believe I read (though I could be wrong) that Windows tries to find the filename, but truncates the space, and so can' t find/open/delete the file...

-B

DrDoc

11:17 pm on Jun 15, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



...unless the filename is in quotes

GeorgeGG

1:46 am on Jun 16, 2004 (gmt 0)

10+ Year Member



Try making the space a ALT-255 or hex FF,
or ALT-10, line feed,
or ALT-13 carriage return etc.

But still can be deleted.

GeorgeGG

paybacksa

2:49 am on Jun 16, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Sorry I can't be more specific, but if you create the file outside of the Windows file system using a character that is illegal for use in filenames according to the Windows file system, it can end up being what you described.

Classic example is upgrading from WinX to Win2000 without clearing the HD, and finding the NTFS file system can read but not delete a file.

Another is on a dual-boot system with Linux, where Windows can see but not delete or rename some files.

If you know the illegal characters, you could always use a DOS shell and hex edit your way to a file as well.

bpresent

3:16 am on Jun 16, 2004 (gmt 0)



call it iexplore.exe ;)