New
#1
Batch File - For Command??
<This post has now been solved>
Hi,
Sorry if this is not the place but does anyone know how to do the following?
I am trying to create a batch file to search a directory for a specified file type and list it in a text file then get the batch file to read that text file and copy all the files it found to a directory.
i have created the following which does work... the problem is, when there is a space in the filename it says it cant find the file, i don't know how to get it to include spaces i would normally by using " ??
Any help will be greatly appreciated.Code:dir /s /b c:\source\*.txt >c:\files2copy.txt for /f %%i in (c:\files2copy.txt) do xcopy %%i %%j %%k c:\dest
Last edited by JDobbsy1987; 14 Sep 2010 at 14:33.