files.txt (Partial list)
%windir%\explorer.exe explorer.ex_ %windir%\system32\taskmgr.exe taskmgr.ex_ %windir%\system32\shell32.dll shell32.dl_
The first column in text file lists the location where I want the file to come from. The second column is the compressed form in ISO. Thus, I'm using the tokens=1 command to specify the first column to collect system files, and tokens=2 to extract from ISO.
Here is the batch script I use to collect files (copy them) to a temp location.
collect_files.cmd
cd /d %~dp0
if not exist Collected_Files md Collected_Files
DEL "%cd%\Collected_Files\*.*" /q
for /F "Tokens=1" %%i IN ('FINDSTR "." files.txt') DO Call :copyfiles "%%i"
goto :exit
:copyfiles
copy %1 "%cd%\Collected_Files"
:exit
The line I need help with is "for /F "Tokens=1" %%i IN ('FINDSTR "." files.txt') DO Call :copyfiles "%%i"". This works perfectly without errors, but I'm not sure if 'FINDSTR "." files.txt' is the correct way of doing it.
Is there a better way of going down the list of first column than using "."?
This post has been edited by spacesurfer: 16 December 2007 - 12:09 PM



Help
Back to top








