windows batch file doesn't work -
i have batch file , doesn't work. funny thing commands work while running inside of cmd window.
the non-working - faulty line batch file:
/f %%i in ('dir /b c:\users\jacek2\desktop\usb\test\1\depesza*') ( move /y c:\users\jacek2\desktop\usb\test\1\"%%i" c:\users\jacek2\desktop\usb\test\1\depesza.cvs && start /wait e:\easyphp-12.0\mysql\bin\mysqlimport.exe --columns=typ_raportu,kod_stacji --user=root --password= --host=127.0.0.1 --fields-enclosed-by="\"" --fields-terminated-by="," --fields-escaped-by="" test c:\users\jacek2\desktop\usb\test\1\depesza.csv)
from cmd window:
c:\>for /f %i in ('dir /b c:\users\jacek2\desktop\usb\test\1\depesza*') move /y c:\users\jacek2\desktop\usb\test\1\"%i" c:\users\jacek2\desktop\usb\test\1\de pesza.cvs && start /wait e:\easyphp-12.0\mysql\bin\mysqlimport.exe --columns=typ _raportu,kod_stacji --user=root --password= --host=127.0.0.1 --fields-enclosed-b y="\"" --fields-terminated-by="," --fields-escaped-by="" test c:\users\jacek2\de sktop\usb\test\1\depesza.cvs
the batch file works when remove code below batch file.
&& start /wait e:\easyphp-12.0\mysql\bin\mysqlimport.exe --columns=typ_raportu,kod_stacji --user=root --password= --host=127.0.0.1 --fields-enclosed-by="\"" --fields-terminated-by="," --fields-escaped-by="" test c:\users\jacek2\desktop\usb\test\1\depesza.csv)
does know why?
try this. if it's not cmd length issue double quotes further along being taken window title. leading "" stop issue.
start "" , rest of command
Comments
Post a Comment