How to write script?

Anonymous
2024-04-17T09:10:52+00:00

Hi

I am new to scripting in the task scheduler to copy files from one location in WinSCP to another location within the WINSCP

I have managed to create a Task but getting stuck on the New action stage Particularly when scrip, add argument section.

The file resides in \sftp3\sftp\packnet here /mnt/sftp2 and I want to move it to /root/mercury/packnet

Now, how do I put this into the task scheduler to Automate every 15 minutes?

Please let me know if you need further explaination

thank you

Windows Server | Remote and virtual desktops | PowerShell

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question. To protect privacy, user profiles for migrated questions are anonymized.

0 comments No comments
{count} votes
Accepted answer
  1. Anonymous
    2024-04-18T03:55:55+00:00

    Hi,

    To run a PowerShell script in a scheduled task, specify powershell.exe in Program/script and -file "C:\path\of\script.ps1" in Add arguments. In the PowerShell script say C:\winscp.ps1 you can add the winscp commands like

    winscp.exe "your site"
    

    I don't use WinSCP but you can refer to the WinSCP site for the detailed commandline options.

    winscp.net

    0 comments No comments

0 additional answers

Sort by: Most helpful