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

martin

Re: Delete File on Schedule

jgn wrote:

if I wanted to go into a specific folder would I just add that to the end of that link after the port? so :2222/folder/?

That works. But more idiomatic approach is to use cd /folder command.
https://winscp.net/eng/docs/scriptcommand_cd
jgn

Re: Delete File on Schedule

So would this be the correct script then?
# Connect to SFTP server using a password
open sftp://ipaddresswithuser:2222/ -passive=on -hostkey="password"
 
# Delete file
rm ums_update.txt
 
# Exit WinSCP
exit

The sftp is my ip and then the port... if I wanted to go into a specific folder would I just add that to the end of that link after the port? so :2222/folder/?
jgn

Delete File on Schedule

I'm new to this program and how to create/run scripts. Everything I've found for deleting a file is linked to an upload, download, or a sync. I don't have a triggering event, I just want to delete all files in a folder on my FTP everyday at 2pm. How would I go about doing that?

Thanks so much!!!