Command line use error message "Could not copy GAMS parameter file " Topic is solved

questions about GAMS' tools
Post Reply
LaurentFranckx
User
User
Posts: 15
Joined: 6 years ago

Command line use error message "Could not copy GAMS parameter file "

Post by LaurentFranckx »

Dear all

When I run GAMS from the command line, I get the following error message:

C:\Program Files (x86)\GAMS22.6>gams C:\Usr\gams\PLANET\pttv_2015\Z_planet_pttv2015
*** Could not copy GAMS parameter file C:\Program Files (x86)\GAMS22.6\gmsprm95.txt -> 225a\gmsprm95.scr

The initial idea was that GAMS was trying to store work files to a folder for which I have no writing permissions.

I have then tried the procedure described in: https://www.gams.com/latest/docs/usergu ... rocdir.htm, and the results was the same:

C:\Program Files (x86)\GAMS22.6>gams C:\Usr\gams\PLANET\pttv_2015\Z_planet_pttv2015 Procdir=C:\Usr\gams\exercises\workfiles
*** Could not copy GAMS parameter file C:\Program Files (x86)\GAMS22.6\gmsprm95.txt -> 225a\gmsprm95.scr

Please advice. I work on a Windows10 PC.
Attachments
cannotcopy1.PNG
cannotcopy1.PNG (5.48 KiB) Viewed 11973 times
LaurentFranckx
User
User
Posts: 15
Joined: 6 years ago

Re: Command line use error message "Could not copy GAMS parameter file "

Post by LaurentFranckx »

Problem solved. Apparently, the error was launching GAMS from its installation folder. The correct procedure is to add the installation folder to the PATH variable, and to call GAMS from another folder, for instance the folder containing your GAMS code.
okaradeniz
User
User
Posts: 2
Joined: 6 years ago

Re: Command line use error message "Could not copy GAMS parameter file "

Post by okaradeniz »

@LaurentFranckx
Hi, I 'm new starter. I have the same issue. However i could not fix it. Could you explain elaborately?

Or anybody helps me?

Thanks in advance.
LaurentFranckx
User
User
Posts: 15
Joined: 6 years ago

Re: Command line use error message "Could not copy GAMS parameter file "

Post by LaurentFranckx »

@okaradeniz
I applied the second solution.
So I put all my gms files in one folder, "mymodel". Before calling an individual gms file, I would change directories:
cd C:\mymodel
And then call my gms file, for instance:
gams 01_macro_part1.gms
Can you check whether this works?
okaradeniz
User
User
Posts: 2
Joined: 6 years ago

Re: Command line use error message "Could not copy GAMS parameter file "

Post by okaradeniz »

@LaurentFranckx Thank you very much! It compiles now :)
Gams_271
User
User
Posts: 2
Joined: 5 years ago

Re: Command line use error message "Could not copy GAMS parameter file Hi, I am new at the GAMS

Post by Gams_271 »

Hi, I am new at the GAMS. I can’t fix it the same problem. I add the installation file to path variable but it did not work. Please help me
LaurentFranckx
User
User
Posts: 15
Joined: 6 years ago

Re: Command line use error message "Could not copy GAMS parameter file "

Post by LaurentFranckx »

@Gams_271
Have you copied the "installation file" or "installation folder" to your PATH variable?
Post Reply