Post a reply

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)


Topic review


Re: Existing files are copied to destination every time

I was asking for a session log file, not debug log file. If possible, I'd still like to see it.

Anyway, indeed IIS is not a good choice for file synchronization.

Re: Existing files are copied to destination every time

martin wrote:


Or attach a complete session log file, naming one of the problematic files.

I turned off IIS-FTP and instead installed Bitvise SSH Server, personal certificate and started my script and then synchronization worked perfectly. Still the same servers in both ends so maybe IIS-FTP/SFTP is not the ideal choice?

Log file

I have attached the log file. User names, passwords, server references, domains has been wiped. Since the file structure contain about 50000 files, I broke the job after some time as this would have resulted in a massive log file.

Existing files are copied to destination every time

I have created a Powershell script to synchronize files from a source- to destination folder. The target is a Microsoft IIS FTP-server.

Copying is based on the following method:
... and should synchronize a remote folder based on the contents of the source folder.

All worked great for days and subsequent runs just copied only the new files as it should. THEN at some point in time it just started copying all files every time and I have not figured out the reason. It could be as part of my code being developed, affecting the behavior, but I feel its pretty standard with regards to setting up the session. Date / time is preserved on the remote folders.

I have set the following session options:
$sessionOptions.Protocol = $script:protocol
$sessionOptions.HostName = $script:ftpserver
$sessionOptions.UserName = $script:user
$sessionOptions.Password = $script:password
$sessionOptions.FtpMode = [WinSCP.FtpMode]::Passive

Transfer options:
$transferOptions = New-Object WinSCP.TransferOptions
$transferOptions.TransferMode = [WinSCP.TransferMode]::Binary
$transferOptions.PreserveTimestamp = $true

Any idea?