Exclude certain file on Synchronize

Advertisement

joeahn
Guest

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

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
27,226
Location:
Prague, Czechia

Re: Exclude certain file on Synchronize

option exclude <yourfilename>
synchronize ...    

_________________
Martin Prikryl

Reply with quote

3K
Donor
Joined:
Posts:
34
Location:
Geneva

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.

Reply with quote

3K
Donor
Joined:
Posts:
34
Location:
Geneva

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.

Reply with quote

3K
Donor
Joined:
Posts:
34
Location:
Geneva

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.

Reply with quote

3K
Donor
Joined:
Posts:
34
Location:
Geneva

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

Reply with quote

martin
Site Admin
martin avatar
Joined:
Posts:
27,226
Location:
Prague, Czechia

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

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

Reply with quote

3K
Donor
Joined:
Posts:
34
Location:
Geneva

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

Reply with quote

martin
Site Admin
martin avatar
Joined:
Posts:
27,226
Location:
Prague, Czechia

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

_________________
Martin Prikryl

Reply with quote

3K
Donor
Joined:
Posts:
34
Location:
Geneva

martin wrote:

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

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

Reply with quote

3K
Donor
Joined:
Posts:
34
Location:
Geneva

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.

Reply with quote

martin
Site Admin
martin avatar
Joined:
Posts:
27,226
Location:
Prague, Czechia

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    

_________________
Martin Prikryl

Reply with quote

3K
Donor
Joined:
Posts:
34
Location:
Geneva

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.

Reply with quote

martin
Site Admin
martin avatar
Joined:
Posts:
27,226
Location:
Prague, Czechia

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.
_________________
Martin Prikryl

Reply with quote

3K
Donor
Joined:
Posts:
34
Location:
Geneva

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.

Reply with quote

3K
Donor
Joined:
Posts:
34
Location:
Geneva

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.

Reply with quote

martin
Site Admin
martin avatar
Joined:
Posts:
27,226
Location:
Prague, Czechia

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.
_________________
Martin Prikryl

Reply with quote

GerMurphy
Guest

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.

Reply with quote

Shikhil
Guest

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.

Reply with quote

Advertisement

You can post new topics in this forum