windows - Need a batch file to move files -
i looking small, free program can use move files 1 folder another. i've done little research , think batch files might best bet. unfortunately, i've never used batch files before , have absolute basic programming skills (took computer science course on java in college).
this looking for:
i have multiple folders within 1 specific folder (.....\phase_2_document_prep) have lots , lots of pdf files within, on 25,000.
i have master excel spreadsheet contains file name of each pdf document , folder supposed in. of now, current files mixed different folders. can create pipe delimited text file has file name , folder.
i need program import txt file containing file name , target folder, search through current 1 specific folder , sub folders find file name (pdf) , move each file target folder.
============== update ======================= code i'm working keep getting ...\files unexpected @ time error , nothing copying.
code:
set filelist=c:\users\mcuomo\documents\test\mudd_3_list.txt set filespath=c:\users\mcuomo\documents\test\files set destpath=c:\users\mcuomo\documents\test\target /f %%x in (%filelist%) call :copy_files "%%x" goto :eof :copy_files /f %filespath% %%i in (%~1) echo xcopy /w /v "%%i" "%destpath%%%~pnxi" pause
thanks again
the error being generated loop under :copy_files.
check how use command - for /?
. /f switch can used in following ways according -
for /f ["options"] %variable in (file-set) command [command-parameters] /f ["options"] %variable in ("string") command [command-parameters] /f ["options"] %variable in ('command') command [command-parameters]
perhaps want change second loop -
for /f %%i in (%~1) echo xcopy /w /v "%filespath%\%%i" "%destpath%\%%~pnxi"
since haven't included it, i'm not sure if backslash needed between path , file name (%filespath% , %%i). might able make more useful if can provide example of content of mudd_3_list.txt
.
Comments
Post a Comment