I’m trying to create a autorun usb that copies a user profile data folder in Windows 7 with the code below with Odrive:
"@echo off
:: variables
/min
SET odrive=%odrive:~0,2%
set backupcmd=xcopy /s /c /d /e /h /i /r /y
echo off
%backupcmd% "%USERPROFILE%\pictures" "%drive%\all\My pics"
%backupcmd% "%USERPROFILE%\Favorites" "%drive%\all\Favorites"
%backupcmd% "%USERPROFILE%\videos" "%drive%\all.\vids"
@echo off
cls"
I don’t want to copy the files from the current user but from another user on the server without being logged into the one I want to target. The path is “C:/Users/Adam” with red hat but I don’t know how to get the code to target the specific user folder and copy it to my usb. How would the code be written or is it even possible to do?