copy /u /s

  • This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.
#1
When using copy /u /s Dir1 Dir2 while Dir1 or a subdir of it contains no files but only subdirs there comes a message "no more files" and an internal error %2 is thrown. Although this behaviour is probalby correct (I do not exactly know the specs) is it unusable: using this in a batch file with an "on error" set the workflow will never come to all of the subdirs to synchronize them.
suggestion: an additional flag to ignore (but nevertheless copying or not according to the /f-flag) empty dirs when using the /s-switch.
 
#2
JP Software Forums" <neil@jpsoft.com>; "wbiebel wrote:
| When using copy /u /s Dir1 Dir2 while Dir1 or a subdir of it itself
| no files but only subdirs there comes a message "no more files" and
| an internal error %2 is thrown. Although this behaviour is probalby
| correct (I do not exactly know the specs) is it unusable: using this
| in a batch file with an "on error" set the workflow will never come
| to all of the subdirs to synchronize them. suggestion: an additional
| flag to ignore (but nevertheless copying or not according to the
| /f-flag) empty dirs when using the /s-switch.

Please check the /Ne option - it might be just what you wanted!
--
Steve