New
#1
Batch File execution problem
I have created a batch program as listed below. It is supposed to read all MP3 files from given folderMP3_CDs_12GB recursively and write to three folders B0 (first 999 files), B1 (next 999 files) and B2 (balance of about 2,800 files). It should also write three text files with the File serial Nimber and name of file with complete path to three corresponding text files Mp3_0.txt (first 999 files), MP3_1.txt (next 999 files) and MP3_2.txt (balance files).
The batch program is listed below:
---------------------------------------------------------------------------------------
@echo off
SetLocal EnableDelayedExpansion
set /A x=0
set dest=
For /F "delims=," %%f in (MP3_CDs_12GB) DO (
set /A x+=1
if !x! leq 999 goto B0
if !x! leq 1999 goto B1
if !x! leq 2800 goto B2
goto continue
:B0
copy "%%f" "e:\Fls_MP3\B0\"
echo !x! %%f >> "e:\Fls_MP3\MP3_0.txt
goto continue
:B1
copy "%%f" "e:\Fls_MP3\B1\"
echo !x! %%f >> "e:\Fls_MP3\MP3_1.txt
goto continue
:B2
copy "%%f" "e:\Fls_MP3\B2\"
echo !x! %%f >> "e:\Fls_MP3\MP3_2.txt
goto continue
:continue
echo atContinue
echo "Next file"
)
:finish
echo "Finished"
goto :eof
--------------------------------------------------------------------
When executed it gives error "Syspen cannot find file specifies and halts. Any help will be appreciated.