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

Shikhil

Rename existing file when syncing - File version with winscp

Dear Team, need to know how to script winscp to rename the newly copied file to the destination, if it already exists there. Kind of file versioning.
GerMurphy

Ignore Certain Folders During a sync

I was wondering how to sync all folders on my desktop computer with those hosted on a remote server.
I have established connection with the server and been able to synchronize with it but there are folders to which I do not have the required permissions and I wish to exclude them from the sync.

This is not a problem if doing it manually but I wish to automate the process.
martin

Re: Parameter -filemask in .NET Assembly?

3K wrote:

What will be the equivalent command of filemask in .NET Assembly as shown below?
...

Please use .NET assembly / COM library forum.
3K

Parameter -filemask in .NET Assembly?

What will be the equivalent command of filemask in .NET Assembly as shown below?

synchronize -filemask="*.doc*<2012-02-01; *.ppt*<2012-02-01" local C:\TEST\docs /docs

.NET example:
synchronizationResult =
session.SynchronizeDirectories(
SynchronizationMode.Local, @"C:\TEST\docs", "/docs", false);


Thank you.
martin

3K wrote:

For my other question, is there a web page describing the new Synchronize command, with examples? If there is none yet, it's ok.

The up-to-date documentation is on the same page all the time:
https://winscp.net/eng/docs/scriptcommand_synchronize
3K

Thank again :D , that command worked perfectly.

For my other question, is there a web page describing the new Synchronize command, with examples? If there is none yet, it's ok.

Regards.
martin

synchronize -filemask="*.doc*<2012-02-01; *.ppt*<2012-02-01" local C:\TEST\docs /docs


Also, is it possible to have the new switch commands available for synchronize?

Do not understand.
3K

Thanks again, it works. That command filters Word doc with timestamp.

Another question, if I would like to include multiple filters, for example, Word (*.doc*) and Powerpoint (*.ppt*) files, what will be the command. I tried the command below, but it doesn't work.

synchronize -filemask="*.doc* *.ppt* <2012-02-01 00:00:00" local C:\TEST\docs /docs


Also, is it possible to have the new switch commands available for synchronize?

Many thanks for your excellent support.

Regards.
martin

The -filemask swich overrides include option (which is obsolete anyway with 5.0.6).
Also there's no -include switch.

Correct syntax is:
synchronize -filemask="*.doc*<2012-02-01 00:00:00" local C:\TEST\docs /docs
3K

Hi Martin,

I was trying to synchronize with filemask and include Word documents (*.doc*) only using the commands below, but it seems, it doesn't work:

option include=*.doc*

synchronize -filemask="<2012-02-01 00:00:00" local C:\TEST\docs /docs


synchronize -filemask="<2012-02-01 00:00:00" local C:\TEST\docs /docs -include="*.doc*"


Could you kindly help me.
Thank you.
3K

martin wrote:

synchronize -filemask="<2012-02-01 00:00:00" local C:\TEST\docs /docs


Thanks Martin, that command works well, :D excellent.
martin

synchronize -filemask="<2012-02-01 00:00:00" local C:\TEST\docs /docs
3K

martin wrote:

I have emailed you a link to development version of WinSCP.

Syntax file mask with timestamp is:
<2012-02-01 00:00:00


Thanks a lot Martin, got the development version. In my script below, if I wanted to synchronize documents posted >= 2012-01-01 00:00:00, where will I insert the command:

open ftp://username:password@ftpserver.itu.int

synchronize local C:\TEST\docs /docs
close


Thanks again.

Regards
martin

I have emailed you a link to development version of WinSCP.

Syntax file mask with timestamp is:
<2012-02-01 00:00:00
3K

Is it possible to request pre-release version (5.0.6) of WinSCP? I recently donated a small amount. Thanks. :)
3K

In Tracker Bug 672, the status is Fixed in: 5.0.6. Does it mean version 5.0.6? Is it possible to download this version and know the command to exclude by date stamp (not time stamp as written in my previous post)? Currently, in the download page, we can see 5.0.5 but not 5.0.6.

Thanks.
3K

In Tracker Bug 672, the status is Fixed in: 5.0.6. Does it mean version 5.0.6? Is it possible to download this version and know the command to exclude by time stamp? Currently, in the download page, we can see 5.0.5 but not 5.0.6.

Thanks.
martin

Re: Synchronize files from specified date stamp?

Thanks for your post.

This request is being tracked already:
https://winscp.net/tracker/672
3K

Synchronize files from specified date stamp?

Hi,

Is there a command to synchronize files starting from a specified date stamp? I would like to exclude files if their file's modified dates is before 1 Jan 2012.

Thanks.
martin

Re: Exclude certain file on Synchronize

option exclude <yourfilename>

synchronize ...
joeahn

Exclude certain file on Synchronize

Hi,

Is there a way to exclude certain file when using Synchronize. If yes, could you give me a simple example code.

Thanks