question

XuTao-5937 avatar image
0 Votes"
XuTao-5937 asked AndreasBaumgarten edited

can i robocopy only specific folder

my thing: i have 4 folder in temp

c:\temp\1
2
3
4
ther are 4 folders. i want copy folder 3 only.

if i robocopy c:\temp\3 . it only copy what within folder 3 , not folder 3 itself?

windows-api
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

AndreasBaumgarten avatar image
0 Votes"
AndreasBaumgarten answered AndreasBaumgarten edited

Hi @XuTao-5937 ,

you could try the /xd option of robocopy to exclude folders.
https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/robocopy#file-selection-options


(If the reply was helpful please don't forget to upvote and/or accept as answer, thank you)

Regards
Andreas Baumgarten

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.