I have a Windows batch file that used to work but since I changed laptop, it fails.
I guess it's caused by points (.) in my file path but I haven't been able to find a way around this issue.
I basically pass a file name to my batch file and let it process it but it fails when it starts reading lines from the file:
echo MBP File: %1
rem Check that the file is a MapBasic Project File
if /I "%~sx1" NEQ ".mbp" (
echo Error: file %~dpnx1 is not a MapBasic Project File ^(^*.mbp^)
goto :EOF
) else (
echo file %1 is a MapBasic Project File ^(^*.mbp^)
)
echo Looping MBP
for /f "usebackq skip=1 delims== tokens=2" %%j in (%1) do (
echo Checking input file from MBP
echo j: %%j
SET filemb=%~dp1%%j
....
The output looks like this:
file "D:\Dropbox (Some-Name)\3. MB_Kode\mbInfoSelHandler\mbcode\InfoSelHandler.mbp" is a MapBasic Project File (*.mbp)
Looping MBP
\3. was unexpected at this time.
As you can see the last echo'ed text is Looping MBP
The file contains lines like these:
[LINK]
Application=..\InfoSelHandler.mbx
Module=Library\ARRAYLib.mbo
Module=Library\CONFIGFILELib.mbo
Module=Library\DEBUGLib.mbo
I'm assuming there's an issue in this line, but I'm not sure:
for /f "usebackq skip=1 delims== tokens=2" %%j in (%1) do (
Any hints?