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

Raventhrone

Re: Need script to download new version of same file every day at set time

Yes, I can. I actually figured it out. I just put the path right after the server address...this I'm sure I tried before with no success but it works now.
martin

Re: Need script to download new version of same file every day at set time

If you login in WinSCP GUI, can you navigate to the folder that contains the file you want to download?
Raventhrone

Need script to download new version of same file every day at set time

Hello,

I am trying to create a WinSCP script/command to copy a server file to a local directory once per day using a scheduled task. I have been able to get it to work if the file is in my home directory but the file is in another directory above my home directory. I'm not a programmer so I just have no idea if this is even possible and would appreciate any help.

I started with a basic command that works. When I log in to the server, it puts me in a home directory set up by the organization.
/command "open sftp://username:password@ftp.server.ca/" "get test.txt C:\Users\Raventhrone\Desktop\"

I've then tried the following with no success:
/command "open sftp://username:password@ftp.server.ca/folder1" "get test2.txt C:\Users\Raventhrone\Desktop\"
/command "open sftp://username:password@ftp.server.ca/" "get /folder1/test2.txt C:\Users\Raventhrone\Desktop\"

I also played with some directory changing commands but can't seem to get anywhere. And I don't need to just go into a folder below my home directory, I need to go up to a completely different directory that I have access to, ie. "afs/domain.ca/software/windows/app/group/dropbox". My home directory by contrast would be "afs/domain.ca/home/e/r/username/".

Thanks for any assistance!