Using filemask with keepuptodate

Advertisement

rwalk
Joined:
Posts:
1

Using filemask with keepuptodate

Hello all,
I'm working on a script to keep the Documents directory on my server synchronized with the Documents directory on my computer. My goal is to have a script that launches when Windows starts up and runs the keepuptodate command. I want to exclude certain directories inside of Documents from the upload, so I used the filemask command. Here is the script I wrote:

@echo off
cd C:\Program Files (x86)\WinSCP 
winscp.com /ini=nul /command "open sftp://(My Credentials)" "keepuptodate -filemask="*|*\My Music\; *\My Pictures\; *\My Videos\; *\Rainmeter\" C:\Users\rwalk\Documents\ /home/robert/Network_Files/Documents" "exit"
However, running this script returns:
The filename, directory name, or volume label syntax is incorrect.

At first I thought I had some sort of syntax error, but I found that I can run each command individually in the command prompt of WinSCP and it functions (e.g. I run "open sftp..." etc. and then "keepuptodate...")
So, does anyone have any ideas what might be causing this problem and how to prevent it?
I'm using WinSCP Version 5.11.3 with Microsoft Windows 10.
Thanks!

Reply with quote

Advertisement

Guest

Update:
I realized I had a syntactical error in my initial command, and changed it to:
"keepuptodate -filemask=|My Music\; My Pictures\; My Videos\; Rainmeter\ C:\Users\rwalk\Documents /home/robert/Network_Files/Documents"

However, when I run the updated script I get the error:

Too many parameters for command 'keepuptodate'.
At this point I'm pretty sure I'm just missing some sort of a closer on the -filemask statement, but I'm not sure what.

Reply with quote

Advertisement

You can post new topics in this forum