HomeCopy.bat uses only standard commands. It assumes that each user's home directory has a common parent folder, as in:


The syntax is:

HomeCopy <Parent Folder> file1\[,file2,file3,....fileN\]

HomeCopy.bat contains:

<b>@echo off
if NOT \{%1\}<h1><a name="_goto_begin_if_NOT_2_">\{\} goto begin
if NOT \{%2\}</a></h1>\{\} goto begin
@echo Syntax: HomeCopy Parent_Folder File1\[,file2,file3,.....filen\]
goto end
goto end
if NOT EXIST %1 goto syntax
set parent=%1
set parent=%parent:"=%
If \{%1\}==\{\} goto finish
if NOT EXIST %1 goto syntax
set filefull=%1
set file=%~nx1
for /f "Tokens=*" %%i in ('dir "%parent%" /B /AD') do call :parse "%%i"
goto loop
set child=%1
set child=%child:"=%
if exist "%parent%\%child%\%file%" del /q "%parent%\%child%\%file%"
copy %filefull% "%parent%\%child%"