Deleting folders from subfolders

  • Thread starter Thread starter Tim_S
  • Start date Start date
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 ...
 
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
 
Back
Top