[<<]Message[>>]    [<<]Author[>>]        Subject[>>]        Thread[>>]

Number : 3 Date : 2001-05-10 Author : Kan Yabumoto Subject : How to remove empty directories Size(KB) : 1
Here's a trick to remove empty directories using XXCOPY. XXCOPY \yourdir\ /RSY /S /X* Explanation: /RSY remove source directory (in this case \yourdir\) /S including subdirectories /X* exclude all files (* == same as *.* in Win32) This technique takes advantage of the exclusion feature which does not delete any existing file in the directory. Since a subdirectory with a file (or subdirectory) won't be deleted, the only subdirectories that are deleted are empty ones. To make this command work better, you may want to add the following switches /H include hidden directories /R handle read-only directories /PD0 suppress prompt on directory /Q2 quiet (no display on skipped files) -------------------------------------- Incidentally, the following XXCOPY command line will do the opposite (delete all files and leave directory skeleton behind) XXCOPY \yourdir\ /RSY /S /ED /PD0 here, /ED preserve an empty directory Again, you may add /H /R /Q2 to make it more bullet-proof. Kan Yabumoto tech.xxcopy@d...
This message if part of XXCOPY's message Archive. The archive contains all the messages posted at Yahoo!Groups: XXCOPY.