Create a folder list with robocopy

Microsoft Windows
Post Reply
User avatar
MigrationUser
Posts: 336
Joined: 2021-Jul-12, 1:37 pm
Contact:

Create a folder list with robocopy

Post by MigrationUser »

09 Mar 2010 03:55
drifty

I can create a file list with robocopy but not able to create a list of just the folders. The end goal is to create a list of only the folders i need then loop through the list and copy only those folders. Any suggestions would be greatly appreciated.

----------------------------

#2 09 Mar 2010 07:06
bluesxman


Using the "/nfl" switch on robocopy when creating your list should make it give you just the directory names.

This switch combination is probably the sort of thing you're after:

Code: Select all

robocopy x:\source y:\target /l /s /nfl /xx /nc /ns /njh /njs
Last edited by bluesxman (09 Mar 2010 07:26)

cmd | *sh | ruby | chef

----------------------------

#3 11 Mar 2010 03:24
drifty


that works - thank you
Post Reply