Resume transfer when target name change

Advertisement

jcroussel
Joined:
Posts:
2

Resume transfer when target name change

Hello,
I need help with a transfer cutoff case.
I would like to resume uploading the file even if the name is not the same.
Example :
- Start uploading local file transfer.txt to target file transfer_150_%TIMESPAMP%.txt (%TIMESPAMP% is variable according to time)
- Network cut
- In the next round, the script create a new file because variable %TIMESPAMP% no longer has the same value
- Therefore, on the server, a temporary file is present from the first upload
How can I handle this case ?

my command :
Put -delete -preservetime %RepWst%\Depart\Transfer.txt %RepArrivee%/Transfer.%NumMag%_%DateHeure%

Thanks,
JC

Reply with quote

Advertisement

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

Re: Resume transfer when target name change

When the connection breaks, WinSCP should resume the transfer itself right away, using the original file name.
You can get this problem, only if you do not let WinSCP resume the transfer and instead you restart your script. Why are you doing this?

Anyway, if you need to support even such scenario, you can hardly do with your simple solution. You will need more complex solution. You will have to tell WinSCP to use then resuming the transfer.

Reply with quote

Advertisement

You can post new topics in this forum