Created
June 18, 2018 10:41
-
-
Save zhanggang807/d5a414175329521403f8b8d19183d1d5 to your computer and use it in GitHub Desktop.
bat script read line from file to exec command such del xcopy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
set folder=xxx-folder | |
set source=yyy-folder | |
for /f "tokens=*" %%A in (C:\Users\Administrator\Desktop\zzz.txt) do ( | |
rem echo %source%%%A %folder%\%%A | |
rem copy %source%%%A %folder%\%%A | |
echo f | xcopy %source%%%A %folder%\%%A /s /e /y | |
) | |
pause |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
set folder=xxx-folder | |
set source=yyy-folder | |
for /f "tokens=*" %%A in (C:\Users\Administrator\Desktop\zzz.txt) do ( | |
rem echo %source%%%A %folder%\%%A | |
rem copy %source%%%A %folder%\%%A | |
del %source%%%A | |
) | |
pause |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment