Synchronizing folders by timestamp issue

Advertisement

hebo209@126.com
Joined:
Posts:
2

Synchronizing folders by timestamp issue

Hello, Administrator.

I currently have the following requirement:
I need to synchronize a local Windows directory to a remote FTP server, only syncing files and folders whose creation time is later than 2025-09-27.
I'm using a command similar to this:
synchronize remote -filemask="*>=2025-09-27" "D:\test02" "/MES/test/test002"
In my local directory, there are both files and folders created before and after 2025-09-27.
When I run this command, I observe that:
Files and folders created after 2025-09-27 are synchronized correctly.
However, folders created before 2025-09-27 are also being synchronized—but only as empty directories (the old files themselves are not transferred).
This behavior deviates from my requirement. I only want to sync files and folders created after 2025-09-27, including their contents, and skip any folders that don’t contain qualifying items.

How should I adjust my command to achieve this?

Below is the structure of my local directory:
Mode                 LastWriteTime         Length Name
----                 -------------         ------ ----
d-----         2025/9/11     16:35                t
d-----         2025/9/28     17:21                test
-a----         2025/9/28     16:43             17 123.txt
-a----         2025/8/24     15:44             30 cmd_start_for.ini
-a----         2024/5/25      8:22          12288 DumpStack.log
-a----         2024/8/19     15:32           2664 https_sunlogin.oray.com.localstorage

Reply with quote

Advertisement

hebo209@126.com
Joined:
Posts:
2

Re: Synchronizing folders by timestamp issue

martin wrote:

To avoid the empty directories, use ExcludeEmptyDirectories raw transfer settings:
https://winscp.net/eng/docs/rawtransfersettings#excludeemptydirectories

Thank you, martin! Using ExcludeEmptyDirectories is indeed a good idea. However, I've tested it, and found that it also filters out empty folders created after 2025-09-27, which is not what I want—I need to preserve empty folders created after 2025-09-27.

Reply with quote

Advertisement

You can post new topics in this forum