|
|
| Next: problem with Active Directory |
| Author |
Message |
Orfeo External

Since: Nov 25, 2006 Posts: 2
|
Posted: Sat Nov 25, 2006 8:34 am Post subject: Filename contains quote mark: can't delete or rename Archived from groups: microsoft>public>win2000>file_system (more info?) |
|
|
I am trying to uninstall a product from a Win2k box. A large number of files
have 8.3 filenames that contain quotation marks ( LA"D3F~1.HTM ).
The full path of one such file is C:\Program Files\Jasc Software Inc\Paint
Shop Pro 8\Learning Center\Command_API\Non-menu_commands\LA"D3F~1.HTM
I can't delete these files using Explorer or command line, specifying the
file with either regular or UNC path or with wildcards.
I've also tried doing this using the Win32 API DeleteFile and DeleteFileW
functions, passing the filename reported by FindNextFile.
I've also tried unsuccessfully to remove the parent directory.
In all instances I get the same error: "The filename, directory name, or
volume label syntax is incorrect."
I also have a few dozen files in my recycle bin that have quotation marks in
their names, and I get the same error message when I try to empty my recycle
bin.
Chkdsk (scheduled for boot time with chkhtfs) doesn't report any errors or
fix the problem.
Can anyone help me figure out how to either delete these files? |
|
| Back to top |
|
 |
Adam Piggott External

Since: Sep 13, 2006 Posts: 11
|
Posted: Sat Nov 25, 2006 5:42 pm Post subject: Re: Filename contains quote mark: can't delete or rename [Login to view extended thread Info.] Archived from groups: per prev. post (more info?) |
|
|
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Orfeo wrote:
> I am trying to uninstall a product from a Win2k box. A large number of files
> have 8.3 filenames that contain quotation marks ( LA"D3F~1.HTM ).
This might be of help:
You cannot delete a file or a folder on an NTFS file system volume
http://support.microsoft.com/kb/320081/en-us
Otherwise there may be other helpful articles at:
http://support.microsoft.com/search/default.aspx?catalog=LCID%3d2057&s...=global
Let us know how you get on!
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (MingW32)
iD8DBQFFaIB37uRVdtPsXDkRAje0AJ0bjv7xoEwxgjWbkCZBKAHQS5bkugCfewe3
AbXbSzrgfb85e8itR9BgA9w=
=jlmc
-----END PGP SIGNATURE----- |
|
| Back to top |
|
 |
R. C. White, MVP External

Since: Nov 28, 2006 Posts: 6
|
Posted: Tue Nov 28, 2006 9:11 pm Post subject: Re: Filename contains quote mark: can't delete or rename [Login to view extended thread Info.] Archived from groups: per prev. post (more info?) |
|
|
Hi, Orfeo.
Have you tried the good ol' dir /x trick?
Open a Command Prompt window. Navigate to the folder that holds that file
in your example. At the command prompt, type: dir /x
This should produce the usual list of all files in that folder, but with an
extra column before the Long File Names (LFN) showing the Short File Names
(SFN), also known as the 8.3 filenames. Then use the del command with that
SFN.
Doesn't always work, but usually does. Worth a try.
RC
--
R. C. White, CPA
San Marcos, TX
rc RemoveThis @grandecom.net
Microsoft Windows MVP
(Currently running Vista x64)
"Orfeo" <Orfeo RemoveThis @discussions.microsoft.com> wrote in message
news:D4C3D46B-C089-4324-A760-2B7FF2FD4D98@microsoft.com...
>I am trying to uninstall a product from a Win2k box. A large number of
>files
> have 8.3 filenames that contain quotation marks ( LA"D3F~1.HTM ).
>
> The full path of one such file is C:\Program Files\Jasc Software Inc\Paint
> Shop Pro 8\Learning Center\Command_API\Non-menu_commands\LA"D3F~1.HTM
>
> I can't delete these files using Explorer or command line, specifying the
> file with either regular or UNC path or with wildcards.
>
> I've also tried doing this using the Win32 API DeleteFile and DeleteFileW
> functions, passing the filename reported by FindNextFile.
>
> I've also tried unsuccessfully to remove the parent directory.
>
> In all instances I get the same error: "The filename, directory name, or
> volume label syntax is incorrect."
>
> I also have a few dozen files in my recycle bin that have quotation marks
> in
> their names, and I get the same error message when I try to empty my
> recycle
> bin.
>
> Chkdsk (scheduled for boot time with chkhtfs) doesn't report any errors or
> fix the problem.
>
> Can anyone help me figure out how to either delete these files? |
|
| Back to top |
|
 |
Orfeo External

Since: Nov 25, 2006 Posts: 2
|
Posted: Tue Nov 28, 2006 9:20 pm Post subject: Re: Filename contains quote mark: can't delete or rename [Login to view extended thread Info.] Archived from groups: per prev. post (more info?) |
|
|
Thanks for the suggestion, RC.
The problem is that the short file name has an illegal character (quote
mark): LA"DF~1.HTM
I don't know how a file got created that has an illegal 8.3 short file name,
but now I don't seem to be able to do anything from explorer, the command
prompt, or Win32 API function calls that can delete it or change anything
about this file.
Wildcards (del *.*) don't do any good. Trying to remove the parent directory
(deleting it from explorer or doing rd /s from the command line) doesn't work.
Everything I try to do ends up with an error of the form "The filename,
directory name, or volume label syntax is incorrect."
I suspect that to get anywhere with this problem, I'm going to need to call
some low-level API, but I don't have a clue where to look.
"R. C. White, MVP" wrote:
> Hi, Orfeo.
>
> Have you tried the good ol' dir /x trick?
>
> Open a Command Prompt window. Navigate to the folder that holds that file
> in your example. At the command prompt, type: dir /x
>
> This should produce the usual list of all files in that folder, but with an
> extra column before the Long File Names (LFN) showing the Short File Names
> (SFN), also known as the 8.3 filenames. Then use the del command with that
> SFN. |
|
| Back to top |
|
 |
KeithMail External

Since: Aug 24, 2006 Posts: 7
|
Posted: Mon Dec 18, 2006 4:25 pm Post subject: Re: Filename contains quote mark: can't delete or rename [Login to view extended thread Info.] Archived from groups: per prev. post (more info?) |
|
|
If this helps.. We had a Windows 2000 based net server attacked and a series
of restricted name files and folders (like lpt and com) were created by the
hackers, there was a KB article which we used which described using Windows
posix? subsystem commands to remove the files. Similar to that described in
the 320081 recommended by Adam but using the win2000 resource kit file
RM.exe
It worked but we had to use peculiar file path entries.. does that make any
sense or trigger a bell with anyone else to find more information with?
There's a reference to something similar on www.pkidd.com/win_faq.htm and
search for posix
I draw the comparison because of the failure we had using the "normal"
windows file commands to remove the garbage.
Does using a single ? char in place of the quote symbol in the file name
help?
Does Ztree (ztree.com) do it, our regular techy swears by it.
Keith
"Orfeo" <Orfeo.RemoveThis@discussions.microsoft.com> wrote in message
news:E9213F65-849C-4A2B-9CAC-1A00D70A5FD0@microsoft.com...
> Thanks for the suggestion, RC.
>
> The problem is that the short file name has an illegal character (quote
> mark): LA"DF~1.HTM
>
> I don't know how a file got created that has an illegal 8.3 short file
name,
> but now I don't seem to be able to do anything from explorer, the command
> prompt, or Win32 API function calls that can delete it or change anything
> about this file.
>
> Wildcards (del *.*) don't do any good. Trying to remove the parent
directory
> (deleting it from explorer or doing rd /s from the command line) doesn't
work.
>
> Everything I try to do ends up with an error of the form "The filename,
> directory name, or volume label syntax is incorrect."
>
> I suspect that to get anywhere with this problem, I'm going to need to
call
> some low-level API, but I don't have a clue where to look.
>
> "R. C. White, MVP" wrote:
>
> > Hi, Orfeo.
> >
> > Have you tried the good ol' dir /x trick?
> >
> > Open a Command Prompt window. Navigate to the folder that holds that
file
> > in your example. At the command prompt, type: dir /x
> >
> > This should produce the usual list of all files in that folder, but with
an
> > extra column before the Long File Names (LFN) showing the Short File
Names
> > (SFN), also known as the 8.3 filenames. Then use the del command with
that
> > SFN.
> |
|
| Back to top |
|
 |
James External

Since: Aug 20, 2005 Posts: 35
|
Posted: Thu Dec 28, 2006 12:06 pm Post subject: Re: Filename contains quote mark: can't delete or rename [Login to view extended thread Info.] Archived from groups: per prev. post (more info?) |
|
|
KeithMail wrote:
> If this helps.. We had a Windows 2000 based net server attacked and a series
> of restricted name files and folders (like lpt and com) were created by the
> hackers, there was a KB article which we used which described using Windows
> posix? subsystem commands to remove the files. Similar to that described in
> the 320081 recommended by Adam but using the win2000 resource kit file
> RM.exe
>
> It worked but we had to use peculiar file path entries.. does that make any
> sense or trigger a bell with anyone else to find more information with?
> There's a reference to something similar on www.pkidd.com/win_faq.htm and
> search for posix
> I draw the comparison because of the failure we had using the "normal"
> windows file commands to remove the garbage.
> Does using a single ? char in place of the quote symbol in the file name
> help?
> Does Ztree (ztree.com) do it, our regular techy swears by it.
>
> Keith
>
> "Orfeo" <Orfeo RemoveThis @discussions.microsoft.com> wrote in message
> news:E9213F65-849C-4A2B-9CAC-1A00D70A5FD0@microsoft.com...
>> Thanks for the suggestion, RC.
>>
>> The problem is that the short file name has an illegal character (quote
>> mark): LA"DF~1.HTM
>>
>> I don't know how a file got created that has an illegal 8.3 short file
> name,
>> but now I don't seem to be able to do anything from explorer, the command
>> prompt, or Win32 API function calls that can delete it or change anything
>> about this file.
>>
>> Wildcards (del *.*) don't do any good. Trying to remove the parent
> directory
>> (deleting it from explorer or doing rd /s from the command line) doesn't
> work.
>> Everything I try to do ends up with an error of the form "The filename,
>> directory name, or volume label syntax is incorrect."
>>
>> I suspect that to get anywhere with this problem, I'm going to need to
> call
>> some low-level API, but I don't have a clue where to look.
>>
>> "R. C. White, MVP" wrote:
>>
>>> Hi, Orfeo.
>>>
>>> Have you tried the good ol' dir /x trick?
>>>
>>> Open a Command Prompt window. Navigate to the folder that holds that
> file
>>> in your example. At the command prompt, type: dir /x
>>>
>>> This should produce the usual list of all files in that folder, but with
> an
>>> extra column before the Long File Names (LFN) showing the Short File
> Names
>>> (SFN), also known as the 8.3 filenames. Then use the del command with
> that
>>> SFN.
>
>
If there is anyone out there that knows the directory layout used in M$
perhaps they can jump in with the method to use at the hex mode of the
system. I knew the formats of older directories and routinely fixed
problem entries at that level but it requires in depth knowledge of how
the directory entries are handled.
James |
|
| Back to top |
|
 |
Kristiaan

Joined: Dec 31, 2007 Posts: 1
|
Posted: Mon Dec 31, 2007 5:02 am Post subject: [Login to view extended thread Info.] |
|
|
Hi
I had a similar problem, but luckily the quote character was not in the short file name, so I could use the dir /x trick. I had a music file with a " in it's name on CD, which i wanted to copy back onto my hard disk.
Here's what I did:
dir /x gave me the short file name "25IMP~9E.MP3"
simply trying copy ... doesn't work, because the system is trying to copy the long file name along, which is invalid. This happens even if you specify a different name! (doesn't that suck?)
Eventually it worked when I did xcopy /n
This copies the file using the short file name. Afterwards I could just change the name into whatever I liked, but without the " off course.
I hope this helps someone else. |
|
| Back to top |
|
 |
|
|
|
You can post new topics in this forum You can reply to topics in this forum You can edit your posts in this forum You can delete your posts in this forum You can vote in polls in this forum
|
| |
|
|