Deleting files that in in a dot (.)

damunzy

recovering former mod
Retired Moderator
Joined
Oct 29, 2000
Messages
4,981
Location
NJ, USA
Does anyone know how I can delete files that end in a dot (.) ? The Win32 API supposedly cannot handle files that end in a dot (.) but I somehow go them on my system. Thanks!
Code:
C:\Apache2>tree /f /a
Folder PATH listing
Volume serial number is 0006FE80 B8F8:3A4E
C:.
\---mail
    \---dnscache
        \---mx
            +---18
            |       my.netvigator.com.
            |
            +---19
            |       pchome.com.
            |
            +---41
            |       pcmail.com.
            |
            +---52
            |       kimo.com.
            |
            +---57
            |       ethome.net.
            |
            \---82
                    yahoo.com.
 
have you tried butting the filename in quotes?

like: del "my.netvigator.com" ?
 
Good idea, KapetnOvi; unfortunately, it doesn't work.

C:\Apache2\mail\dnscache\mx\18>del "my.netvigator.com."
Could Not Find C:\Apache2\mail\dnscache\mx\18\my.netvigator.com.
 
Maybe there is a way to hack the bytes on the hard drive that store the file names. I've never heard of i before, but I can't see why this wouldn't be possible... unless these areas of the HD are restriced by windows?
 
Are you trying to get rid of everything in that directory, or just one of the sub directories? If you're trying to nuke the entire thing, you could try using deltree. Deltree was always my friend when someone would screw around and create directories that you couldn't access because of the name.

I don't think dos has anything like a backtick in unix, where you could put a \ before the ., and it would indicate that you meant a litteral period instead of the wildcard.

EDIT: As for "hacking" the filesystem, it should be simple to edit the file name via something like norton disk edit.
 
Windows allows you to use "" around the file names but windows just can't seem to handle files that end in ..
Also, unfortunately deltree doesn't exist in Windows 2000 command line.
 
Yup, Win2k doesn't have DELTREE... but it has an improved RD.

C:\>RD /?
Removes (deletes) a directory.

RMDIR [/S] [/Q] [drive:]path
RD [/S] [/Q] [drive:]path

/S Removes all directories and files in the specified directory
in addition to the directory itself. Used to remove a directory
tree.

/Q Quiet mode, do not ask if ok to remove a directory tree with /S
 
You're the best kcwong! rd /s /q C:\Apache2 worked. Someone on a different forum suggested rd to me but I think the /q did it. Thanks again!
 
Back
Top Bottom