Spaces in file names and paths

Top  Previous  Next

One needs to be cautious in the GAMS commands that address external programs and files in dealing with spaces in the file names or paths.  Namely these need to be encased in quote as in the following

 

$call =XLS2gms "i=c:\my documents\test.xls" o=d:\tmp\test.inc

 

However even more complex statements are required in the case of Execute where one would use

 

Execute '=XLS2gms "i=c:\my documents\test.xls" o=d:\tmp\test.inc'

 

enclosing the whole thing in single quotes and elements within containing spaces in double quotes.

These practices need to be followed with respect to all places file names can be specified including $Call, $GDXin, $GDXout, Execute_Load, Execute_Unload, XLIMport, Gdxxrw etc.