Post a reply

Before posting, please read how to report bug or request support effectively.

Bug reports without an attached log file are usually useless.

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

Terralith

Re: Synchronization can't find file

martin wrote:

Thanks for your report.
I have sent you an email with a debug version of WinSCP to the address you have used to register on this forum.


Thanks I'll check it out ASAP.
martin

Re: Synchronization can't find file

Thanks for your report.
I have sent you an email with a debug version of WinSCP to the address you have used to register on this forum.
Terralith

Synchronization can't find file

Hey
I need to check on a folder semi continually and upload any files that are created there to a remote location (ftp server). So I set up a bat file triggering a WinSCP script and a remote synchronization command. Problem is I get an error when I try to run it. Seems the file being transferred can't be found. (Just a test file for now). The reason why I want to do this with a bat file is so that I can remove (or move) the transferred file(s) when they're done, which (as far as I understand) can't be done in the WinSCP script.
Anyway... Can anyone help me? I'm guessing it's something simple I've overlooked...

I'll list the BAT file, WinSCP script and the log here (sorry about the swedish in the log... I could not change the language in Win 7 professional and I think some of the lines in the log are from the operating system...)
I'll "*" out any private info...

****************** prepr.bat *************************
cd /d C:\Program Files (x86)\WinSCP\
WinSCP.exe /log="C:\Program Files (x86)\WinSCP\logg\WinSCP.log" /ini=nul /script="C:\Program Files (x86)\WinSCP\scripts\prepr.txt
cd /d G:\Min enhet\JULI
# del /q *.txt (disabled for now)
# Set the command path back to the location for the bat, just for convenience while testing
cd /d C:\Program Files (x86)\WinSCP\bat\

******************* prepr.txt ************************
# Automatically answer all prompts negatively not to stall
# the script on errors
option batch on
# Disable overwrite confirmations that conflict with the previous
option confirm off
# Connect
open ftp://name:password@something.something.com/ -rawsettings ProxyPort=0
# Change local directory
lcd "g:\min enhet\juli\"
# Force binary mode transfer
option transfer binary
# Sync to remote
synchronize remote -filemask="*.txt"
# Exit WinSCP
exit

*********************** Log file ******************************
. 2018-07-27 11:36:14.437 --------------------------------------------------------------------------
. 2018-07-27 11:36:14.437 WinSCP Version 5.13.3 (Version 8565) (OS 6.1.7601 Service Pack 1 - Windows 7 Professional)
. 2018-07-27 11:36:14.437 Configuration: nul
. 2018-07-27 11:36:14.438 Log level: Normal
. 2018-07-27 11:36:14.438 Local account: name\name
. 2018-07-27 11:36:14.438 Working directory: C:\Program Files (x86)\WinSCP
. 2018-07-27 11:36:14.438 Process ID: 11364
. 2018-07-27 11:36:14.438 Command-line: WinSCP.exe /log="C:\Program Files (x86)\WinSCP\logg\WinSCP.log" /ini=nul /script="C:\Program Files (x86)\WinSCP\scripts\prepr.txt
. 2018-07-27 11:36:14.438 Time zone: Current: GMT+2, Standard: GMT+1 (Västeuropa, normaltid), DST: GMT+2 (Västeuropa, sommartid), DST Start: 25/03/2018, DST End: 28/10/2018
. 2018-07-27 11:36:14.438 Login time: 27 July 2018 11:36:14
. 2018-07-27 11:36:14.438 --------------------------------------------------------------------------
. 2018-07-27 11:36:14.438 Script: Retrospectively logging previous script records:
> 2018-07-27 11:36:14.438 Script: option batch on
< 2018-07-27 11:36:14.438 Script: batch on
> 2018-07-27 11:36:14.438 Script: option confirm off
< 2018-07-27 11:36:14.438 Script: confirm off
> 2018-07-27 11:36:14.438 Script: open ftp://name:***@something.something.com/ -rawsettings ProxyPort=0
. 2018-07-27 11:36:14.438 --------------------------------------------------------------------------
. 2018-07-27 11:36:14.438 Session name: name@something.something.com (Ad-Hoc site)
. 2018-07-27 11:36:14.438 Host name: something.something.com (Port: 21)
. 2018-07-27 11:36:14.438 User name: name (Password: Yes, Key file: No, Passphrase: No)
. 2018-07-27 11:36:14.438 Transfer Protocol: FTP
. 2018-07-27 11:36:14.438 Ping type: Dummy, Ping interval: 30 sec; Timeout: 15 sec
. 2018-07-27 11:36:14.438 Disable Nagle: No
. 2018-07-27 11:36:14.438 Proxy: None
. 2018-07-27 11:36:14.438 Send buffer: 262144
. 2018-07-27 11:36:14.438 UTF: Auto
. 2018-07-27 11:36:14.438 FTPS: None [Client certificate: No]
. 2018-07-27 11:36:14.438 FTP: Passive: Yes [Force IP: Auto]; MLSD: Auto [List all: Auto]; HOST: Auto
. 2018-07-27 11:36:14.438 Local directory: default, Remote directory: home, Update: Yes, Cache: Yes
. 2018-07-27 11:36:14.438 Cache directory changes: Yes, Permanent: Yes
. 2018-07-27 11:36:14.438 Recycle bin: Delete to: No, Overwritten to: No, Bin path:
. 2018-07-27 11:36:14.438 Timezone offset: 0h 0m
. 2018-07-27 11:36:14.438 --------------------------------------------------------------------------
. 2018-07-27 11:36:14.439 Ansluter till something.something.com ...
. 2018-07-27 11:36:15.478 Ansluten med something.something.com. Väntar på välkomstmeddelande...
< 2018-07-27 11:36:15.517 220 ProFTPD 1.3.5rc3 Server (Debian) [::ffff:87.233.68.117]
> 2018-07-27 11:36:15.517 USER prepr_retrofm
< 2018-07-27 11:36:15.555 331 Password required for name
> 2018-07-27 11:36:15.555 PASS **********
< 2018-07-27 11:36:17.414 230 User name logged in
> 2018-07-27 11:36:17.414 SYST
< 2018-07-27 11:36:17.459 215 UNIX Type: L8
> 2018-07-27 11:36:17.459 FEAT
< 2018-07-27 11:36:17.503 211-Features:
< 2018-07-27 11:36:17.503 MFMT
< 2018-07-27 11:36:17.503 SIZE
< 2018-07-27 11:36:17.503 SITE MKDIR
< 2018-07-27 11:36:17.503 MFF modify;UNIX.group;UNIX.mode;
< 2018-07-27 11:36:17.503 REST STREAM
< 2018-07-27 11:36:17.503 MLST modify*;perm*;size*;type*;unique*;UNIX.group*;UNIX.mode*;UNIX.owner*;
< 2018-07-27 11:36:17.503 UTF8
< 2018-07-27 11:36:17.503 EPRT
< 2018-07-27 11:36:17.503 SITE SYMLINK
< 2018-07-27 11:36:17.503 EPSV
< 2018-07-27 11:36:17.503 SITE UTIME
< 2018-07-27 11:36:17.503 LANG en-US
< 2018-07-27 11:36:17.503 MDTM
< 2018-07-27 11:36:17.503 SITE RMDIR
< 2018-07-27 11:36:17.503 TVFS
< 2018-07-27 11:36:17.503 211 End
> 2018-07-27 11:36:17.503 OPTS UTF8 ON
< 2018-07-27 11:36:17.542 200 UTF8 set to on
. 2018-07-27 11:36:17.542 Ansluten
. 2018-07-27 11:36:17.542 --------------------------------------------------------------------------
. 2018-07-27 11:36:17.542 Using FTP protocol.
. 2018-07-27 11:36:17.542 Doing startup conversation with host.
> 2018-07-27 11:36:17.542 PWD
< 2018-07-27 11:36:17.583 257 "/" is the current directory
. 2018-07-27 11:36:17.583 Getting current directory name.
. 2018-07-27 11:36:17.583 Startup conversation with host finished.
< 2018-07-27 11:36:17.583 Script: Aktiv session: [1] name@something.something.com
> 2018-07-27 11:36:17.583 Script: lcd "g:\min enhet\juli\"
< 2018-07-27 11:36:17.584 Script: g:\min enhet\juli
> 2018-07-27 11:36:17.584 Script: option transfer binary
< 2018-07-27 11:36:17.585 Script: transfer binary
> 2018-07-27 11:36:17.585 Script: synchronize remote -filemask="*.txt"
< 2018-07-27 11:36:17.585 Script: Jämför...
. 2018-07-27 11:36:17.585 Collecting synchronization list for local directory 'g:\min enhet\juli' and remote directory '/', mode = Remote, params = 0x2 (NoConfirmation), file mask = '*.txt'
. 2018-07-27 11:36:17.586 Local file 'g:\min enhet\juli\.' [2018-07-26T11:31:41.496Z] [0] excluded from synchronization
. 2018-07-27 11:36:17.587 Local file 'g:\min enhet\juli\..' [2018-07-27T08:08:32.946Z] [0] excluded from synchronization
. 2018-07-27 11:36:17.587 Local file 'g:\min enhet\juli\test.txt' [2018-07-26T11:31:41.488Z] [16] included to synchronization
. 2018-07-27 11:36:17.587 Local file 'g:\min enhet\juli\desktop.ini' [2018-07-27T08:08:15.586Z] [252] excluded from synchronization
. 2018-07-27 11:36:17.587 Återfår listning av kataloger...
> 2018-07-27 11:36:17.587 TYPE A
< 2018-07-27 11:36:17.641 200 Type set to A
> 2018-07-27 11:36:17.641 PASV
< 2018-07-27 11:36:17.695 227 Entering Passive Mode (87,233,68,117,172,161).
> 2018-07-27 11:36:17.695 MLSD
. 2018-07-27 11:36:17.695 Ansluter till 87.233.68.117:44193 ...
. 2018-07-27 11:36:17.762 Data connection closed
. 2018-07-27 11:36:17.762 modify=20180727071737;perm=flcdmpe;type=cdir;unique=810U6112337;UNIX.group=33;UNIX.mode=0755;UNIX.owner=1000; .
. 2018-07-27 11:36:17.762 modify=20180727071737;perm=flcdmpe;type=pdir;unique=810U6112337;UNIX.group=33;UNIX.mode=0755;UNIX.owner=1000; ..
< 2018-07-27 11:36:17.773 150 Opening ASCII mode data connection for MLSD
< 2018-07-27 11:36:18.121 226 Transfer complete
. 2018-07-27 11:36:18.122 Listning av kataloger lyckad
. 2018-07-27 11:36:18.122 ..;D;0;1899-12-30T01:00:00.000Z;0;"" [0];"" [0];---------;0
. 2018-07-27 11:36:18.122 Local file 'g:\min enhet\juli\test.txt' [2018-07-26T11:31:41.488Z] [16] is new
< 2018-07-27 11:36:18.122 Script: Synkroniserar...
. 2018-07-27 11:36:18.122 Synchronizing local directory 'g:\min enhet\juli\' with remote directory '/', params = 0x2 (NoConfirmation)
. 2018-07-27 11:36:18.124 Copying 1 files/directories to remote directory "/" - total size: 16
. 2018-07-27 11:36:18.124 PrTime: Yes; PrRO: No; Rght: rw-r--r--; PrR: No (No); FnCs: N; RIC: 0100; Resume: S (102400); CalcS: No; Mask: *.*
. 2018-07-27 11:36:18.124 TM: B; ClAr: No; RemEOF: No; RemBOM: No; CPS: 0; NewerOnly: No; InclM: *.txt; ResumeL: 0
. 2018-07-27 11:36:18.124 AscM: *.*html; *.htm; *.txt; *.php; *.php3; *.cgi; *.c; *.cpp; *.h; *.pas; *.bas; *.tex; *.pl; *.js; .htaccess; *.xtml; *.css; *.cfg; *.ini; *.sh; *.xml
. 2018-07-27 11:36:18.125 File: 'g:\min enhet\juli\test.txt' [2018-07-26T11:31:41.488Z] [16]
* 2018-07-27 11:36:18.127 (EOSError) Systemfel. Kod: 3.

* 2018-07-27 11:36:18.127 Det går inte att hitta sökvägen
. 2018-07-27 11:36:18.127 Asking user:
. 2018-07-27 11:36:18.127 Fil eller katalog 'g:\min enhet\juli\test.txt' finns inte. ("Systemfel. Kod: 3.

. 2018-07-27 11:36:18.127 Det går inte att hitta sökvägen")
< 2018-07-27 11:36:18.127 Script: Fil eller katalog 'g:\min enhet\juli\test.txt' finns inte.
< 2018-07-27 11:36:18.127 Script: Systemfel. Kod: 3.

< 2018-07-27 11:36:18.127 Det går inte att hitta sökvägen
* 2018-07-27 11:36:18.127 (ESkipFile) Fil eller katalog 'g:\min enhet\juli\test.txt' finns inte.
* 2018-07-27 11:36:18.127 Systemfel. Kod: 3.
* 2018-07-27 11:36:18.127 Det går inte att hitta sökvägen
. 2018-07-27 11:36:18.127 Copying finished: Transferred: 0, Elapsed: 0:00:00, CPS: 0/s
. 2018-07-27 11:36:18.128 Script: Failed
> 2018-07-27 11:36:18.128 Script: exit
. 2018-07-27 11:36:18.128 Script: Exit code: 1
. 2018-07-27 11:36:18.130 Kopplar ifrån server