Post a reply

Options
Add an Attachment

If you do not want to add an Attachment to your Post, please leave the Fields blank.

(maximum 10 MB; please compress large files; only common media, archive, text and programming file formats are allowed)

Options

Topic review

gnich

Re: Prevent access to file until upload complete

martin wrote:

If you can wait couple days, 5.0.8 with Session.RenameFile will be out.
Or you can use Session.ExecuteCommand to execute protocol-specific command to rename the file.


Thanks for the update, I've got a few days before the program needs to go to user testing so I'll wait and hope to include it in the production version.

What I have done for the moment is to use the following, which is working OK with our FTP server

session.ExecuteCommand("RNFR /folder/Filename.txt.tmp")
session.ExecuteCommand("RNTO /folder/FileName.txt")

GNich
martin

Re: Prevent access to file until upload complete

If you can wait couple days, 5.0.8 with Session.RenameFile will be out.
Or you can use Session.ExecuteCommand to execute protocol-specific command to rename the file.
gnich

Prevent access to file until upload complete

Hi All,

My problem is how to stop people accessing the file until the upload has been completed.

I'm new to scripting WinSCP and currently moving a program from MS Access to VB.net. In the Access version scripting is used and uploads the file with filename.ext.tmp and then uses MV to rename it to filename.ext. In the new VB.net version I'm trying to use the winSCP.dll (WinSCP 5.0.7 beta) I can upload the file but the .net version of MV is not available. What would be the best thing to do?

Any help would be gratefully received

Thanks
GNich