Paul wrote:
> Crest Teethgel wrote:
>>
>> The file to be deleted is: not locked, attribut normal, o byte
>> The exception here is that it's filename ended with a space. Filename
>> "25 The "
>>
>> explorer.exe gives the following message when the action is to delete it:
>> Impossible de supprimer fichier: impossible de lire à partir du
>> fichier ou de la disquette source
>> This can be translated as:
>> Impossible to delete file: Impossible to read from file or from
>> diskette source
>>
>> After a Google search I did the following (resulting messages are
>> translated):
>>
>> del "25 The "
>> del "\\.\c:\prob\25 The "
>> Impossible to find ... 25 The
>>
>> chkdsk /f c:
>> problem still persistant
>>
>> C:\gnuwin32\bin\rm -f "25 The "
>> C:\gnuwin32\bin\rm -f "\\.\c:\prob\25 The "
>> No message
>>
>> RmDir \\.\C:\prob /s /q
>> 25 The - Le fichier spécifié est introuvable.
>> 25 The - Specified file can not be found
>>
>> C:\SysinternalsSuite\sdelete.exe ".\25 The "
>> No files found that match
>>
>> Boot with safety mode + del
>> Impossible to find
>>
>> hardlinkcreate.exe ".\bof.txt" ".\25 The "
>> Specified file (2) can not be found
>>
>> fsutil file createnew ".\25 The " 0
>> 25 The created.
>> The file created here is "25 The" not "25 The ".
>>
>> From my humble opinion a direct intervention in NTFS is the only way
>> to go.
>> But I don't know how.
>>
>> Someone can help me ?
>> Thank you in advance.
>
> Some of the things you've tried, are described here.
>
> http://support.microsoft.com/kb/320081
>
> NTFS stores file names in Unicode. Perhaps the
> file name is not exactly "25 The " as you expect ?
>
> Could it be, that a non-printable character is also
> in the file name ? That might be the problem, rather
> than the space character at the end of the name.
>
> Paul
To test what the real file name might be, I tried some testing in
a VirtualPC session. I have Win2K running in a virtual machine.
I created an NTFS virtual disk in there, and put a few files on
it at the root level.
Next, I booted the same virtual machine, using a Linux LiveCD
(Knoppix 6.2.1), and used the ntfsinfo command, which is
part of some ntfs utilities. It is already included on the CD,
and doesn't need to be installed with package manager or anything.
This is the command that worked for me, to give an example of
the syntax.
ntfsinfo -v -F / -d /dev/sdb1
The disk is not mounted in Linux, while running the command. If
the file explorer window is currently showing the contents of the
disk, you'd right click the disk icon and select an unmount option,
to unmount it.
Now, path names are referenced to the root level of the disk.
In this example, by using the -v verbose option, the program
will dump the file names of all the files in the "/" directory.
If you were working in C:\some\directory , then you'd use
-F /some/directory
to list the directory contents. You still have to figure out the raw device
name, which in my virtual example was /dev/sdb1. The "1" indicates
in this example, that it was the first partition on the sdb disk
device.
So I can use that program, as an example of dumping detailed information
about the files. I can get both the long file name and the short
file name, using that method. Perhaps the file could be deleted,
using its short file name (8.3 style).
The weird part is, the execution of that command, does not give me
the impression it could handle Unicode, but I don't really know how
to fake a good Unicode example to work with :-)
Paul