Error changing directory to '/Processed'

Advertisement

sminar814
Joined:
Posts:
2
Location:
Texas

Error changing directory to '/Processed'

I have a SFTP script I've been running for a long time and now in the last couple of months, it fails. No changes have been made.

Command Line:
"C:\Program Files (x86)\WinSCP\WinSCP.com" /script=c:\Scripts\IMMTrac\SFTP-dqa-report.txt /log=c:\scripts\immtrac\winscp.log
Script:
# Automatically abort script on errors
option batch abort
# Disable overwrite confirmations that conflict with the previous
 
# Force binary mode transfer
option transfer binary
synchronize local \\FileServer\depts\ImmunizationErrorReports\dqa-report /dqa-report
close
exit
Error: (there is no directory called Processed in this session. I do have multiple SFTP WinSCP connections listed)
Using SFTP protocol.
. 2016-10-28 10:09:20.613 Doing startup conversation with host.
> 2016-10-28 10:09:20.614 Type: SSH_FXP_INIT, Size: 5, Number: -1
< 2016-10-28 10:09:20.664 Type: SSH_FXP_VERSION, Size: 5, Number: -1
. 2016-10-28 10:09:20.664 SFTP version 4 negotiated.
. 2016-10-28 10:09:20.664 We will use UTF-8 strings when appropriate
. 2016-10-28 10:09:20.664 Changing directory to "/Processed".
. 2016-10-28 10:09:20.664 Getting real path for '/Processed'
> 2016-10-28 10:09:20.664 Type: SSH_FXP_REALPATH, Size: 19, Number: 16
< 2016-10-28 10:09:20.980 Type: SSH_FXP_NAME, Size: 32, Number: 16
. 2016-10-28 10:09:20.980 Real path is '/Processed'
. 2016-10-28 10:09:20.980 Trying to open directory "/Processed".
> 2016-10-28 10:09:20.980 Type: SSH_FXP_LSTAT, Size: 23, Number: 263
< 2016-10-28 10:09:21.082 Type: SSH_FXP_STATUS, Size: 56, Number: 263
< 2016-10-28 10:09:21.083 Status code: 2, Message: 263, Server: File not found: /users/DOCWRL/Processed, Language:  
* 2016-10-28 10:09:21.083 (ECommand) Error changing directory to '/Processed'.
* 2016-10-28 10:09:21.083 No such file or directory.
* 2016-10-28 10:09:21.083 Error code: 2
* 2016-10-28 10:09:21.083 Error message from server: File not found: 
* 2016-10-28 10:09:21.083 Request code: 7
. 2016-10-28 10:09:21.084 Getting current directory name.
. 2016-10-28 10:09:21.084 Getting real path for '.'
> 2016-10-28 10:09:21.084 Type: SSH_FXP_REALPATH, Size: 10, Number: 528
< 2016-10-28 10:09:21.164 Type: SSH_FXP_NAME, Size: 23, Number: 528
. 2016-10-28 10:09:21.165 Real path is '/'
. 2016-10-28 10:09:21.165 Startup conversation with host finished.
< 2016-10-28 
. 2016-10-28 10:09:21.166 Script: Failed
. 2016-10-28 10:09:21.166 Script: Exit code: 1
. 2016-10-28 10:09:21.166 Closing connection.
. 2016-10-28 10:09:21.166 Sending special code: 12
. 2016-10-28 10:09:21.166 Sent EOF message
Note: This is just a snippet of the error log that is relevant.

There is no directory called Processed in the session. I do have other saved sessions that may have a Processed directory. Any ideas?

The WinSCP GUI is working just fine and I start in the correct directory, only the script is not working.

Thanks!
Last edited by sminar814 on 2016-11-03 22:56; edited 1 time in total

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
41,504
Location:
Prague, Czechia

Re: Error changing directory to '/Processed'

Please attach a full session log file showing the problem (using the latest version of WinSCP).

To generate the session log file, use /log=path_to_log_file command-line argument. Submit the log with your post as an attachment. Note that passwords and passphrases not stored in the log. You may want to remove other data you consider sensitive though, such as host names, IP addresses, account names or file names (unless they are relevant to the problem). If you do not want to post the log publicly, you can mark the attachment as private.

Reply with quote

sminar814
Joined:
Posts:
2
Location:
Texas

Re: Error changing directory to '/Processed'

I did add the /ini=nul command line switch and that resolved the error, but now I get prompt every time with this:
continue connecting and add host key to cache? Yes, No, Cancel, Copy key?

The script will pause until I give an answer - yes, no or cancel. See log below. Also, I'll work on upgrading to the latest version. Thanks!
. 2016-10-31 10:45:56.669 --------------------------------------------------------------------------
. 2016-10-31 10:45:56.669 WinSCP Version 5.1.4 (Build 3020) (OS 6.1.7600)
. 2016-10-31 10:45:56.669 Configuration: nul
. 2016-10-31 10:45:56.671 
. 2016-10-31 10:45:56.671 Working directory: C:\Scripts\IMMTrac
. 2016-10-31 10:45:56.671 Command-line: "C:\Program Files (x86)\WinSCP\WinSCP.exe" /console=514 /consoleinstance=_3100_487 "/script=c:\Scripts\IMMTrac\SFTP-dqa-report.txt" "/ini=nul" "/log=c:\scripts\immtrac\winscp.log" 
. 2016-10-31 10:45:56.671 Time zone: Current: GMT-5, Standard: GMT-6, DST: GMT-5, DST Start: 3/13/2016, DST End: 11/6/2016
. 2016-10-31 10:45:56.671 Login time: Monday, October 31, 2016 10:45:56 AM
. 2016-10-31 10:45:56.671 --------------------------------------------------------------------------
. 2016-10-31 10:45:56.671 Session name: immtrac(Ad-Hoc session)
. 2016-10-31 10:45:56.671 Host name: immtrac
. 2016-10-31 10:45:56.671 User name: ##### (Password: Yes, Key file: No)
. 2016-10-31 10:45:56.671 Tunnel: No
. 2016-10-31 10:45:56.671 Transfer Protocol: SFTP
. 2016-10-31 10:45:56.671 Ping type: -, Ping interval: 30 sec; Timeout: 15 sec
. 2016-10-31 10:45:56.671 Proxy: none
. 2016-10-31 10:45:56.671 SSH protocol version: 2; Compression: No
. 2016-10-31 10:45:56.671 Bypass authentication: No
. 2016-10-31 10:45:56.671 Try agent: Yes; Agent forwarding: No; TIS/CryptoCard: No; KI: Yes; GSSAPI: No
. 2016-10-31 10:45:56.671 Ciphers: aes,blowfish,3des,WARN,arcfour,des; Ssh2DES: No
. 2016-10-31 10:45:56.671 SSH Bugs: A,A,A,A,A,A,A,A,A,A
. 2016-10-31 10:45:56.671 SFTP Bugs: A,A
. 2016-10-31 10:45:56.671 Return code variable: Autodetect; Lookup user groups: A
. 2016-10-31 10:45:56.671 Shell: default
. 2016-10-31 10:45:56.671 EOL: 0, UTF: 2
. 2016-10-31 10:45:56.671 Clear aliases: Yes, Unset nat.vars: Yes, Resolve symlinks: Yes
. 2016-10-31 10:45:56.671 LS: ls -la, Ign LS warn: Yes, Scp1 Comp: No
. 2016-10-31 10:45:56.671 Local directory: default, Remote directory: home, Update: Yes, Cache: Yes
. 2016-10-31 10:45:56.671 Cache directory changes: Yes, Permanent: Yes
. 2016-10-31 10:45:56.671 DST mode: 1; Timezone offset: 0h 0m
. 2016-10-31 10:45:56.671 --------------------------------------------------------------------------
. 2016-10-31 10:45:56.672 Looking up host "immtrac"
. 2016-10-31 10:45:56.681 Connecting to ######## port 22
. 2016-10-31 10:45:56.737 Server version: SSH-2.0-WS_FTP-SSH_7.6.3 FIPS
. 2016-10-31 10:45:56.737 Using SSH protocol version 2
. 2016-10-31 10:45:56.737 We claim version: SSH-2.0-WinSCP_release_5.1.4
. 2016-10-31 10:45:56.772 Using Diffie-Hellman with standard group "group14"
. 2016-10-31 10:45:56.772 Doing Diffie-Hellman key exchange with hash SHA-1
. 2016-10-31 10:45:57.203 Verifying host key rsa2 
. 2016-10-31 10:45:57.203 Asking user:
. 2016-10-31 10:45:57.203 The server's host key was not found in the cache. You have no guarantee that the server is the computer you think it is.
. 2016-10-31 10:45:57.203 
. 2016-10-31 10:45:57.203 The server's rsa2 key fingerprint is:
. 2016-10-31 10:45:57.203 ssh-rsa 1024 
. 2016-10-31 10:45:57.203 
. 2016-10-31 10:45:57.203 If you trust this host, press Yes. To connect without adding host key to the cache, press No. To abandon the connection press Cancel.
. 2016-10-31 10:45:57.203 
. 2016-10-31 10:45:57.203 Continue connecting and add host key to the cache? ()
. 2016-10-31 10:46:10.715 Host key fingerprint is:
. 2016-10-31 10:46:10.715 ssh-rsa 1024 6f:a5:45:71:ed:35:41:d6:d0:7d:60:72:79:fb:2e:4c
. 2016-10-31 10:46:10.716 Initialised AES-256 SDCTR client->server encryption
. 2016-10-31 10:46:10.716 Initialised HMAC-SHA1 client->server MAC algorithm
. 2016-10-31 10:46:10.716 Initialised AES-256 SDCTR server->client encryption
. 2016-10-31 10:46:10.716 Initialised HMAC-SHA1 server->client MAC algorithm
! 2016-10-31 10:46:10.955 Using username "#####".
. 2016-10-31 10:46:11.194 Prompt (7, SSH password, , &Password: )
. 2016-10-31 10:46:11.194 Using stored password.
. 2016-10-31 10:46:11.194 Sent password
. 2016-10-31 10:46:11.222 Access granted
. 2016-10-31 10:46:11.237 Opened channel for session
. 2016-10-31 10:46:11.493 Started a shell/command
. 2016-10-31 10:46:11.493 --------------------------------------------------------------------------
. 2016-10-31 10:46:11.493 Using SFTP protocol.
. 2016-10-31 10:46:11.493 Doing startup conversation with host.
> 2016-10-31 10:46:11.494 Type: SSH_FXP_INIT, Size: 5, Number: -1
< 2016-10-31 10:46:11.513 Type: SSH_FXP_VERSION, Size: 5, Number: -1
. 2016-10-31 10:46:11.513 SFTP version 4 negotiated.
. 2016-10-31 10:46:11.513 We will use UTF-8 strings when appropriate
. 2016-10-31 10:46:11.513 Getting current directory name.
. 2016-10-31 10:46:11.513 Getting real path for '.'
> 2016-10-31 10:46:11.513 Type: SSH_FXP_REALPATH, Size: 10, Number: 16
< 2016-10-31 10:46:11.799 Type: SSH_FXP_NAME, Size: 23, Number: 16
. 2016-10-31 10:46:11.799 Real path is '/'
. 2016-10-31 10:46:11.799 Startup conversation with host finished.
< 2016-10-31 10:46:11.799 Script: Active session: [1] ####@immtrac#####.us
> 2016-10-31 10:46:11.800 Script: option transfer binary
< 2016-10-31 10:46:11.800 Script: transfer        binary    
> 2016-10-31 10:46:11.801 Script: synchronize local \\server\depts\ImmunizationErrorReports\dqa-report /dqa-report
< 2016-10-31 10:46:11.801 Script: Comparing...
. 2016-10-31 10:46:11.801 Collecting synchronization list for local directory '\\server\depts\ImmunizationErrorReports\dqa-report' and remote directory '/dqa-report', mode = 1, params = 2
. 2016-10-31 10:46:11.810 Local file '\\server\depts\ImmunizationErrorReports\dqa-report\.' [2016-10-31T13:15:06.494Z] [0] excluded from synchronization
. 2016-10-31 10:46:11.811 Local file '\\server\depts\ImmunizationErrorReports\dqa-report\..' [2014-12-13T04:20:42.149Z] [0] excluded from synchronization
.
> 2016-10-31 10:46:11.852 Type: SSH_FXP_OPENDIR, Size: 20, Number: 267
< 2016-10-31 10:46:11.967 Type: SSH_FXP_HANDLE, Size: 12, Number: 267
> 2016-10-31 10:46:11.967 Type: SSH_FXP_READDIR, Size: 12, Number: 524
< 2016-10-31 10:46:12.098 Type: SSH_FXP_NAME, Size: 16323, Number: 524
> 2016-10-31 10:46:12.099 Type: SSH_FXP_READDIR, Size: 12, Number: 780
< 2016-10-31 10:46:12.132 Type: SSH_FXP_NAME, Size: 222, Number: 780
> 2016-10-31 10:46:12.132 Type: SSH_FXP_READDIR, Size: 12, Number: 1036
< 2016-10-31 10:46:12.161 Type: SSH_FXP_STATUS, Size: 28, Number: 1036
< 2016-10-31 10:46:12.161 Status code: 1
> 2016-10-31 10:46:12.161 Type: SSH_FXP_CLOSE, Size: 12, Number: 1284
. 2016-10-31 10:46:12.175 Local file '\\server\depts\ImmunizationErrorReports\dqa-report\docwrl.16242.hl7.ack.hl7' [2016-10-27T20:43:50.035Z] [1064] is modifed comparing to remote file '/dqa-report/docwrl.16242.hl7.ack.hl7' [2016-09-15T10:39:14.000Z] [1064]
. 2016-10-31 10:46:12.181 Local file '\\server\depts\ImmunizationErrorReports\dqa-report\docwrl.16242.hl7.errors.txt' [2016-10-27T20:43:50.188Z] [0] is modifed comparing to remote file '/dqa-report/docwrl.16242.hl7.errors.txt' [2016-09-15T10:39:05.000Z] [0]
. 2016-10-31 10:46:12.181 Local file '\\server\depts\ImmunizationErrorReports\dqa-report\docwrl.16242.hl7.log.txt' [2016-10-27T20:43:49.888Z] [3299] is modifed comparing to remote file '/dqa-report/docwrl.16242.hl7.log.txt' [2016-09-15T10:39:14.000Z] [3299]
 
< 2016-10-31 10:46:12.214 Script: Synchronizing...
. 2016-10-31 10:46:12.218 Synchronizing local directory '\\server\depts\ImmunizationErrorReports\dqa-report\' with remote directory '/dqa-report/', params = 2
> 2016-10-31 10:46:12.218 Script: close
. 2016-10-31 10:46:12.218 Closing connection.
. 2016-10-31 10:46:12.218 Sending special code: 12
. 2016-10-31 10:46:12.218 Sent EOF message

Reply with quote

Advertisement

You can post new topics in this forum