![]()
[<<]Message[>>] [<<]Author[>>] [<<]Subject [<<]Thread
Number : 5463 Date : 2003-09-04 Author : Kan Yabumoto Subject : Re: Keep empty directories. Size(KB) : 1
Robert wrote: >Hi, > >Great utility! > >I would like to use XXCOPY to do some file deletion for clean up >purposes. I am using the /RS option to delete files. However, I >would like to keep empty directories, but I don't seem to find a way >to prevent the deletion of them other than using the prompts which >is unacceptable in an automated scenario. > >The command I'm using is: > >xxcopy c:\MyDir\Myfiles*.* /rs/s/PD0/Y /DB:2003-08-15 > > >My concern is that a directory may contain files where all dates are >before 8-15-2003. Then, the above will delete all files, AND the >subdirectory. If another program comes along expecting that >directory to be there, then I'm in trouble. > >Any ideas? Did I miss a switch that already exists? Yes. You missed it. The /ED (preserve Empty-Directory) prevents XXCOPY from deleting empty ones (by default). Furthermore, the /ED switch accepts an optional parameter which may be used to set for how many levels of directories to protect from deletion. You should glance over the XXTB #27 http://www.xxcopy.com/xxcopy27.htm to search for features. Kan Yabumoto
This message if part of XXCOPY's message Archive. The archive contains all the messages posted at Yahoo!Groups: XXCOPY.