Using winscp.ini file causes issue for simultaneous transfer

Advertisement

JimLewis
Joined:
Posts:
5
Location:
UK

Using winscp.ini file causes issue for simultaneous transfer

Hi Martin,

I am running a number of automated simultaneous sftp transfers using winscp 4.3.7. Each transfer is called from a central dos bat file that uses a winscp command line call. The call to winscp has an ini file specified using the \ini switch.

My issue is that winscp regularly updates the [Configuration\CDCache] section of my ini file. This becomes a problem when two simultaneous transfers try to update the ini file at the same time and I get -

Can't create file 'E:\WINSCP3\4.3.7\WINSCP.INI'.
System Error. Code: 32.
The process cannot access the file because it is being used by another process


This causes me to get a failure status for the transfer.

Is there any way to stop winscp from updating the ini file (or is there any other way around this)? I need to be able to process a number of 'file transfer' queues simultaneously and I don't want to build in a restriction that makes it one file at a time - that would make the whole process extremely slow. I could have a seperate copy of the ini file for each queue but that seems over the top (i.e. maintaining 20 ini files all of which hold mostly the same information).

I'm not sure if this is an issue if I used the registry rather than an ini file but I would prefer to use ini files as this allows me better control over our (several) test environments.

Can you advise please?

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
41,518
Location:
Prague, Czechia

Re: Using winscp.ini file causes issue for simultaneous transfer

It should help if you set the INI file read-only. Let me know.

Reply with quote

JimLewis
Joined:
Posts:
5
Location:
UK

Seems to work but at a cost.

Hi Martin,

Thanks for the suggestion.

I've tried this and can see from the datestamp that the ini file is no longer updated with each fetch or put. Presumably the issue of dual access will have been resolved - I will leave the jobs running and see what happens.

Are there any negative side effects to making the ini file read only? For example, will the transfers take longer?

Reply with quote

martin
Site Admin
martin avatar

Re: Seems to work but at a cost.

JimLewis wrote:

Are there any negative side effects to making the ini file read only? For example, will the transfers take longer?
I'm not aware of any.

Reply with quote

Advertisement

You can post new topics in this forum