I have this two lines :
cd /D c:\temp
for /f "delims=" %%a in ('dir /b ^| findstr /c:"test"') do copy "%%a" "e:\SXS"
I look for files with name-test to copy to destination.
can I changed it to one line or somthing else I dont want that in the end I will be in this directory (c:\temp)?
Improve ...
Moderator: DosItHelp
Re: Improve ...
Code: Select all
Pushd c:\temp
for /f "delims=" %%a in ('dir /b ^| findstr /c:"test"') do copy "%%a" "e:\SXS"
Popd