what im I missing

October 22, 2010 at 13:22:52
Specs: Windows XP
SetLocal EnableDelayedExpansion

I'm transporting file
in the two folder
the name except the extension are the same
so I looking in the folder to see if the name of the file or in both if not moveing the not file to the run folder

for /f %%A in ('dir /s/b/o:n ".\pdf\*.pdf"') do (
set aaa=%%~nA
set flagA=0

for /f %%B in ('dir /s/b/o:n ".\kesi\*.kes"') do (
set bbb=%%~nB
if %AAA%==%BBB% (
set flagA=1
goto :a1
if flagA==0 (
xcopy "%%A" ".\run\"


See More: what im I missing

October 22, 2010 at 14:36:02
There are so many mistakes in your batch that I can't point out them all.

The most relevant are

with delayed expansion enabled the variables must be coded wirh ! not % e.g. !aaaa! not %aaaa%
In a FOR loop it is not allowed to jump to a label INSIDE the loop.

And there are others too... An horrible script!

Report •

December 9, 2010 at 07:38:31
how to you set goto like for that time in a run of a loop

Report •
Related Solutions

Ask Question