home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   alt.msdos.batch.nt      Fun with Windows NT batch files      68,980 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 68,743 of 68,980   
   Q to All   
   Help With Robocopy & Source Folders Usin   
   30 Jan 24 14:56:02   
   
   From: q@q.com   
      
   I am trying to robocopy all the folders in a folder which start with   
   "P-" to a network share.  I understand Robocopy does not work using   
   wildcards in the source folder.  How can I do this in a batch using a   
   For command?  I tried   
      
   For /d %%a in ("d:\folder source\P-*") Do Robocopy "%%a" "\\unc path to   
   folder\data\%%a" /variousrobocopyswitches   
      
   but %%a is picking up the entire path and trying to use it as the   
   destination.  I only need the folders that start with "-P" to be copied   
   to the "data" folder that lives in the destination path.  How do I   
   separate the "P-" folders found from the source path?   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca