batch file - DIR recursion doesn't recognize folders beginning with a number -
i want replace 1 image in sub-directories, recursive function of dir (/s) doesn't recognize folders origin number. example, replace file in directory "example/image.txt" not "1234 folder/image.txt"
@echo off dir /s /b image.jpg >> filelisting.txt echo image replaced in next folders: >> imagelocations.txt /f %%a in (filelisting.txt) ( echo %%a >> imagelocations.txt xcopy /f /q "%cd%\image.jpg" "%%a" ) del filelisting.txt
for /f
command, default, seek tokenize input lines using spaces , tabs delimiters between tokens. if files/folders have spaces in names, part before space retrieved. avoid it, disable line splitting setting delimiters empty list
for /f "delims=" %%a in (filelisting.txt) ( ....
batch-file cmd
No comments:
Post a Comment