Good morning guys. I am trying to create a batch file, and I was hoping somebody with a bit more experience could help me clean it up. I have the basic idea, but I'm definitely not doing it correctly.
Basically, I want to create a batch that will copy all of the files in a particular folder from each user that exists on a system. So if the system has five profiles, it will copy the files from all users' roaming folders, if they exist.
Here is what I have now:
for /d %%u in (\\computer.domain\c$\users\*) do for %%x in (xml) do xcopy /s /c /i /y "\\computer.domain\c$\users\%%~nu\appdata\roaming\folder\subfolder\*.%%x" "X:\folder\subfolder"
Can someone point me in the right direction? Thanks!
Basically, I want to create a batch that will copy all of the files in a particular folder from each user that exists on a system. So if the system has five profiles, it will copy the files from all users' roaming folders, if they exist.
Here is what I have now:
for /d %%u in (\\computer.domain\c$\users\*) do for %%x in (xml) do xcopy /s /c /i /y "\\computer.domain\c$\users\%%~nu\appdata\roaming\folder\subfolder\*.%%x" "X:\folder\subfolder"
Can someone point me in the right direction? Thanks!