The MASM Forum Archive 2004 to 2012

Miscellaneous Forums => 16 bit DOS Programming => Topic started by: herge on June 23, 2006, 04:29:27 AM

Title: How Do You Remove Directory
Post by: herge on June 23, 2006, 04:29:27 AM
 Hi All:

I have been having trouble removing Directories if they
have a space in them.

06/23/2006  12:23 AM    <DIR>          ..
06/22/2006  11:46 PM    <DIR>          Believers v University
06/23/2006  12:24 AM               862 SCREEN.ASC
06/22/2006  11:40 PM    <DIR>          Spartans v Peaceks
               1 File(s)            862 bytes
               4 Dir(s)   1,494,360,064 bytes free

C:\PROGRA~1\FIRAXI~1\SIDMEI~1\SCENAR~1\FACTIO~1\Spartans v Peaceks>dir
Volume in drive C has no label.
Volume Serial Number is A444-EBD1
Directory of C:\PROGRA~1\FIRAXI~1\SIDMEI~1\SCENAR~1\FACTIO~1\Spartans v Peaceks
06/22/2006  11:40 PM    <DIR>          .
06/22/2006  11:40 PM    <DIR>          ..
               0 File(s)              0 bytes
               2 Dir(s)   1,494,360,064 bytes free
C:\PROGRA~1\FIRAXI~1\SIDMEI~1\SCENAR~1\FACTIO~1\Spartans v Peaceks>cd ..
C:\PROGRA~1\FIRAXI~1\SIDMEI~1\SCENAR~1\FACTIO~1>rmdir Spartans~1
The system cannot find the file specified.
C:\PROGRA~1\FIRAXI~1\SIDMEI~1\SCENAR~1\FACTIO~1>rmdir Spartans v Peaceks
The system cannot find the file specified.
The system cannot find the file specified.
The system cannot find the file specified.
C:\PROGRA~1\FIRAXI~1\SIDMEI~1\SCENAR~1\FACTIO~1>snap

Any Suggestions?

Title: Re: How Do You Remove Directory
Post by: zooba on June 23, 2006, 05:43:47 AM
Put talking marks around it:

rmdir "Spartans v Peaceks"

Alternatively, do DIR /X and use the short name (ie. sparta~1 or similar) instead.

Cheers,

Zooba :U
Title: Re: How Do You Remove Directory
Post by: P1 on June 23, 2006, 02:04:18 PM
Did you want ASM code tips with that?   Then post some code.

Regards,  P1   :8)
Title: Re: How Do You Remove Directory
Post by: herge on June 24, 2006, 11:48:12 AM
 Hi ALL:

dir /x

works for me! To get the Short Name or ~Name.

And rmdir "directory Name"

Also works for me!

Now if I could only get rid of those pesky
hidden files? I could dump another duplicated
directory. I always find if you want something
done right you have to do it Yourself.
And Sometimes you have to do it from
a Dos Box[Command.com]
Long Live DOS!

Thany you Zooba.