Batch Script robocopy exclude files but not in every folder -


i trying copy contents of c:\ drive 1 computer new computer. trying copy user files , not system files. code far.

@echo off cls @echo type old computer name set /p asset= @echo. @echo user's aiu? set /p useraiu=  robocopy.exe \\%asset%\c$\ c:\ /s /z /xjd /xj /xa:sh /xa:t /xd "dir1" "dir2"  /xf *.dll *.log *.txt *.exe /log+:"\\server\path\%asset%-to-%computername%-transfer.log" /np /fp /v /tee 

i have exclude hidden files, system files , temporary files. wanted exclude .dll .log .txt .exe files root of c not folders being transferred.

is possible exculde files root of c still transfer them if exist in folders?

you use xcopy doesn't copy hidden files or system files. add /e parameter copy empty folders. add /c parameter ignore errors.

xcopy %src% %dest% /exclude:extlist.txt /s 

extlist.txt

.dll\ .txt\ .exe\ .log\ .tmp\ 

edit: misunderstood question. didn't realize copying networked computer. xcopy won't work then.


Comments

Popular posts from this blog

Java 3D LWJGL collision -

spring - SubProtocolWebSocketHandler - No handlers -

methods - python can't use function in submodule -