Topic "Pause for auto update"

Author Message
Toadmyster
[View user's profile]

Joined: 2016-01-15
Posts: 5
Is there a way to pause the auto update. I have audio files that automatically record clips in 15 minute intervals. I would like the auto update to pause while the audio file is finished being recorded. The auto update is detecting a change every 2 seconds, uploads the file, then keeps detecting the change as the file has not finished recording.
Advertisements
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25034
Location: Prague, Czechia
Just script the synchronize command and run it from a Windows Scheduler (or in a batch file in a loop) every few minutes. Plus use -filemask=|>15N switch to exclude too new files.

https://winscp.net/eng/docs/scriptcommand_synchronize
https://winscp.net/eng/docs/file_mask
https://winscp.net/eng/docs/guide_schedule
Toadmyster
[View user's profile]

Joined: 2016-01-15
Posts: 5
So it should look like this?

bat file:
Code:
:Loop
winscp.com /script=script.txt ^
    "option batch abort" ^
    "open <session>" ^
    "synchronize remote <local directory> <remote directory>" ^
    "exit"
timeout 10
goto :Loop


txt file:
Code:
open sftp://user:password@webiste
synchronize remote filemask=|>15N "C:\Users\ME\Desktop\folder\" "/home/website/public_html/folder/"
exit
Toadmyster
[View user's profile]

Joined: 2016-01-15
Posts: 5
I've updated my post showing contents of both files. Hopefully you can help me figure this out.
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25034
Location: Prague, Czechia
Like this:

Code:
:Loop
winscp.com /script=script.txt
timeout 10
goto :Loop

The script file is good.

---

Or like this and you do not need the script file:

Code:
:Loop
winscp.com /command ^
    "open sftp://user:password@webiste" ^
    "synchronize remote filemask=|>15N ""C:\Users\ME\Desktop\folder\"" ""/home/website/public_html/folder/""" ^
    "exit"
timeout 10
goto :Loop
Toadmyster
[View user's profile]

Joined: 2016-01-15
Posts: 5
When I double click on the .bat file, the windows command prompt opens and this is all that happens:

Code:

C:\Program Files (x86)\WinSCP>winscp.com /command
winscp>


Should I be executing it another way?

Thanks for your help by the way!
Toadmyster
[View user's profile]

Joined: 2016-01-15
Posts: 5
I think I have it working now. Thanks for your help!
Advertisements

You can post new topics in this forum






Search Site

What is WinSCP?

It is award-winning SFTP client, SCP client, FTPS client and FTP client integrated into one software program for file transfer to FTP server or secure SFTP server. [More]

And it's free!

Donate

About donations

$9   $19   $49   $99

About donations

Recommend

WinSCP Privacy Policy

WinSCP License