![]()
[<<]Message[>>] [<<]Author[>>] [<<]Subject [<<]Thread
Number : 10768 Date : 2005-03-12 Author : John Zeman Subject : Re: Limiting search of directories Size(KB) : 1
--- In xxcopy@yahoogroups.com, "noopykat2002" wrote: > > > I am attempting to create a script to archive files based on last > accessed date. I want to automate this as the number of folders > (folder1, folder2, etc.) may vary from time to time. The folder > structure on a fileshare similar to the one below: > > I: > \mainfiles1 > \folder1 > \subfolder1 > \subfolder2 > \mainfiles2 > \folder1 > \subfolder1 > \subfolder2 > \folder2 > \subfolder1 > \subfolder2 > \folder3 > \subfolder1 > \subfolder2 > > I only want to search under mainfiles2. There are about 60 folders > which may contain any number of subfolders. There are various files > in the folder and in all the subfolders. Is there a way to create a > script that will only search the root of folder1, folder2, folder3, > etc. for files and not the subfolder1, subfolder2, etc. > > Thanks. I am not sure I understand your question but if you only want to xxcopy files in one level of directories, you could use the combination of the following 2 options: /x\* /dL:2 where /x\* will exclude the files in the source root. and /DL:2 will limit the source directory processing to 2 levels (with the first level being excluded by the first option). So the following script should copy files from the source, to the destination based on the last accessed date, but only copy files in the first subdirectory level of I:\mainfiles2\ xxcopy I:\mainfiles2\ \DST\ /bn/fa/s/r/h/tca/ff/x\* /dL:2 John
This message if part of XXCOPY's message Archive. The archive contains all the messages posted at Yahoo!Groups: XXCOPY.