ini file being used by another porcess

Advertisement

Moji
Guest

ini file being used by another porcess

When I execute winscp script, I am getting this.
Can't create file 'C:\winscp\winscp.ini'
The porcess cannot access the file because itis being used by another process.

The error occur only when a lot of scripts are running together. If one or two scripts are running together is ok.

Please help me to resolve the problem.

Thanks!

Reply with quote

Advertisement

martin◆
Site Admin
martin avatar
Joined:
Posts:
43,036
Location:
Prague, Czechia

Re: ini file being used by another porcess

In general you should not rely on external configuration in your scripts.
To isolate your script from any configuration, use /ini=nul command line switch:
https://winscp.net/eng/docs/scripting#configuration

If you really want to use an external configuration INI file (though again, you should not), set the INI file read-only to prevent WinSCP from trying to update it.
https://winscp.net/eng/docs/config#ini_readonly

Reply with quote

moji
Guest

Re: ini file being used by another porcess

martin wrote:

In general you should not rely on external configuration in your scripts.
To isolate your script from any configuration, use /ini=nul command line switch:
https://winscp.net/eng/docs/scripting#configuration

If you really want to use an external configuration INI file (though again, you should not), set the INI file read-only to prevent WinSCP from trying to update it.
https://winscp.net/eng/docs/config#ini_readonly

We set the INI file read-only. It works. Thanks for your help.

Reply with quote

Advertisement

You can post new topics in this forum