Deleting folders from subfolders

T

Tim_S

I have a need to delete folders/files from under a sub folder what is the
command.....???

Under a users profile on a XP OS, there is a hidden local settings folder,
in this folder there is a Temp folder. I have a batch routine to clean out
this folder of files but it does not remove any subfolders that may exist in
there. For instance,
\documents and settings\username\local settings\temp
contains files itself, also the folder may contain other folders like
_is112, Acrobat Distiller 6, and other random generated folders. using the
Del command with /f /q /s command against the folder does not remove the
folders but it does clean out the files in the sub folders. such as

Del "c:\documents and settings\username\local settings\temp\*.*" only
cleans out the files not folders
and the rmdir (RD) command does not let you use wild cards so you have to
specify each folder. This changes from system to system depending on what
the user does.

Maybe i am losing my "DOS" days skills but I would like to clean out this
temp folder of all files and folders without removing/deleting/recreating
the temp folder itself. from within a batch routine.

Thanks
DOS fried ...
 
W

Wesley Vogel

Type: rd /? in a command prompt and hit Enter.

Rmdir (rd) HELP...
Paste the following line into Start | Run and click OK...

hh ntcmds.chm::/rmdir.htm

--
Hope this helps. Let us know.

Wes
MS-MVP Windows Shell/User

In
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top