Removing files with invalid filenames

iamwiz82

Lifer
Jan 10, 2001
30,772
13
81
There are a couple of files leftover from a crash that have invalid characters in them and I cannot remove them.

I've tried everything I could think of:

rd
del
\\.\rd
\\.\del
going through FTP

I cannot boot into another OS, so don't bother with that option.

What else can I try?
 

montag451

Diamond Member
Dec 17, 2004
4,587
0
0
What OS/disk format etc? NTFS/DOS/OS2?????

Where are the files.
Why can't you format?
What about a checkdisk?
Fdisk?
Slaving the drive into another system or using it in a USB caddy, or slaving it to your system with another hdd used as a system disk?
 

iamwiz82

Lifer
Jan 10, 2001
30,772
13
81
Win2k Server
NTFS
In a user folder
I think the other users would be mad at me ;)
Ran chkdsk, doesn't fix the issue
See #4
SCSI Raid 1+0


 

montag451

Diamond Member
Dec 17, 2004
4,587
0
0
Have you got full permissions for that folder? - Not just 'modify'.
If not, you may have to ask admin to do it for you, - is this at work?
 

iamwiz82

Lifer
Jan 10, 2001
30,772
13
81
Originally posted by: montag451
Oh dear

What was in that folder before?

User doesn't remember. :roll: ;)

It's safe to blast the whole thing. I have the entire directory on many different backup tapes so I'd like to nuke the whole thing.

I'm assuming that it was writing these two file when we had a drive failure and RAID didn't know what to do.
 

montag451

Diamond Member
Dec 17, 2004
4,587
0
0
Could you use something like Brute Force Uninstaller?
But, if the MFT is screwed up, then it is unlikely that you will be able to delete them.
Can you run a scan utility from the disk manufacturer?
It might give you a good excuse to nuke it.
 

iamwiz82

Lifer
Jan 10, 2001
30,772
13
81
I've tried Delete FXP to no avail.

At the very best I won't be able to format it until July. It's more of an annoyance right now. Both files are 0 bytes.
 

talyn00

Golden Member
Oct 18, 2003
1,666
0
0
you might want to check out the permissions for those files, its possible they got screwed up. I had it happen once where I couldnt delete the files as admin until i fixed the permissions for those files
 

iamwiz82

Lifer
Jan 10, 2001
30,772
13
81
Erro- The filename, directory name, or volume label syntax is incorrect.

I confirmed that I have full rights.
 

Mutilator

Diamond Member
Aug 22, 2000
3,513
10
81
I take it since it's a server is the reason you said you can't boot into another OS? Reason I ask is if you can reboot the machine then you could use something like a bootable version of Super WinPE 2004 or something similar that'll let you boot to a CD version of XP and delete the files that way.

Or if the system has to stay on then have you tried taking ownership of each of the files manually and then deleting them? Sometimes it's not enough to have file permissions, you also have to be the owner of the files... since this was in a user's folder I'm assuming that user is probably the owner, not you or your Administrator account.
 

xtknight

Elite Member
Oct 15, 2004
12,974
0
71
If you have NTFS symlink it to a valid filename and delete it.

This is what I did to get rid of the too-long Battlefield 2 cache files.

http://www.sysinternals.com/Utilities/Junction.html

junction c:\validfile c:\invalidfilename
del c:\validfile


so for example (copy the invalid name in to the DOS window):

junction C:\valid C:\foobar\²¥ÿ??®?8?
del C:\valid


also works for directories:

rmdir C:\valid

If that doesn't work, the MBR is corrupt. You need to do /f for it to fix. Also add in /x if the drive isn't your Windows boot drive so Windows can just dismount it and do it right then without rebooting.

chkdsk /f C:

This won't do a sector-by-sector check, it will just repair the journal which shouldn't take that long at all. It worked when I had an overclocking, well, 'incident', I prefer to call it. ;)
 

Fardringle

Diamond Member
Oct 23, 2000
9,200
765
126
I have often been able to get rid of files like that by booting to Safe Mode - Command Prompt and from the command prompt, delete the files using their 8.3 short file names.

For example:

A file named "My Old Stuff$$.docstuff" would be something similar to "myolds~1.doc"


If you want to get rid of an entire folder, "deltree <foldername>" from the command prompt can also work.
 

iamwiz82

Lifer
Jan 10, 2001
30,772
13
81
Originally posted by: Fardringle
I have often been able to get rid of files like that by booting to Safe Mode - Command Prompt and from the command prompt, delete the files using their 8.3 short file names.

For example:

A file named "My Old Stuff$$.docstuff" would be something similar to "myolds~1.doc"


If you want to get rid of an entire folder, "deltree <foldername>" from the command prompt can also work.

There are no short filenames, I forgot to mention that.

xtknight, I'll give that a try in a few minutes.


EDIT: Tried Junction, no luck.
 

iamwiz82

Lifer
Jan 10, 2001
30,772
13
81
Originally posted by: Nocturnal
Did you try booting into safe mode - command prompt?

There is very little/no time for me to be able to reboot it as it's constantly in use.
 

Fardringle

Diamond Member
Oct 23, 2000
9,200
765
126
Safe Mode - Command Prompt, or booting to a Linux distro on CD are pretty much the only ways you're going to get rid of those files unless you can find a program that will bypass the Windows file system restrictions in order to delete them while Windows is running (not likely, and even if you did find one I personally wouldn't use it since it could end up causing other file system problems with the rest of the files on the drive).
 

Dave332

Member
Jun 24, 2004
78
0
0
I realize you said you can't boot into another os, but just in case it annoys you enough to make proper notification and/or do it after hours, there's a way to do it in linux. You will need a linux live cd and a utility called Captive NTFS. I like Knoppix because it's a great tool, and comes with Captive NTFS, though you have to launch it from GUI before you can use it for mount. After you've launched it, use the command


sudo mount -t captive-ntfs -o uid=knoppix,gid=knoppix /dev/hda1 /mnt/hda1


where /dev/hda1 is the partition you want to mount and /mnt/hda1 is the mount point you want. Just a thought, hope it helps.