Some user after login it shows home directory of user e.g. \user\home\username and other FTP user not set any home directory so it goes to /root directory.
Here is the log from 5.1.0 where its not thorwing any error at three times changing directory i.e. cd..and continue and exit script without any issue. (log shows "C:\tmp\TestData\D100817.bat" missing i did it purposly to show script code works in 5.1.0 but not in 5.7.6
Please review the log and let me know if you have any suggestion around this issue.
======== 5.1.0 log =======================================
. 2016-03-08 13:35:45.280 --------------------------------------------------------------------------
. 2016-03-08 13:35:45.280 WinSCP Version 5.1.0 (Build 2625) (OS 5.1.2600 Service Pack 3)
. 2016-03-08 13:35:45.280 Configuration: HKEY_CURRENT_USER\Software\Martin Prikryl\WinSCP 2\
. 2016-03-08 13:35:45.280 Local account: XXXXX\XXXXX.XXXXX
. 2016-03-08 13:35:45.280 Working directory: C:\Program Files\WinSCP510
. 2016-03-08 13:35:45.280 Command-line: "C:\Program Files\WinSCP510\WinSCP.exe" /console=510 /consoleinstance=_5576_344 "/script=C:\tmp\TestUpload.bat" "/log=c:\tmp\winscp.log"
. 2016-03-08 13:35:45.280 Login time: 08 March 2016 13:35:45
. 2016-03-08 13:35:45.280 --------------------------------------------------------------------------
. 2016-03-08 13:35:45.280 Session name:
[email protected] (Modified stored session)
. 2016-03-08 13:35:45.280 Host name: 10.xxx.10.xxx (Port: 9326)
. 2016-03-08 13:35:45.280 User name: user (Password: Yes, Key file: No)
. 2016-03-08 13:35:45.280 Tunnel: No
. 2016-03-08 13:35:45.280 Transfer Protocol: FTP
. 2016-03-08 13:35:45.280 Ping type: C, Ping interval: 30 sec; Timeout: 15 sec
. 2016-03-08 13:35:45.280 Proxy: none
. 2016-03-08 13:35:45.280 FTP: FTPS: None; Passive: Yes [Force IP: A]
. 2016-03-08 13:35:45.280 Local directory: default, Remote directory: home, Update: Yes, Cache: Yes
. 2016-03-08 13:35:45.280 Cache directory changes: Yes, Permanent: Yes
. 2016-03-08 13:35:45.280 DST mode: 1
. 2016-03-08 13:35:45.280 --------------------------------------------------------------------------
. 2016-03-08 13:35:45.280 Connecting to 10.xxx.10.xxx:9326 ...
. 2016-03-08 13:35:45.280 Connected with 10.xxx.10.xxx:9326. Waiting for welcome message...
< 2016-03-08 13:35:45.296 220 Service ready for new user..
> 2016-03-08 13:35:45.296 USER user
< 2016-03-08 13:35:45.296 331 User name okay, need password for user.
> 2016-03-08 13:35:45.296 PASS ********
< 2016-03-08 13:35:45.296 230 User logged in, proceed.
> 2016-03-08 13:35:45.296 SYST
< 2016-03-08 13:35:45.296 215 UNIX Type: L8.
> 2016-03-08 13:35:45.296 FEAT
< 2016-03-08 13:35:45.296 502 Command FEAT not implemented.
. 2016-03-08 13:35:45.296 Connected
. 2016-03-08 13:35:45.296 --------------------------------------------------------------------------
. 2016-03-08 13:35:45.296 Using FTP protocol.
. 2016-03-08 13:35:45.296 Doing startup conversation with host.
> 2016-03-08 13:35:45.296 PWD
< 2016-03-08 13:35:45.296 257 "/" is current working directory.
. 2016-03-08 13:35:45.296 Getting current directory name.
. 2016-03-08 13:35:45.296 Startup conversation with host finished.
< 2016-03-08 13:35:45.296 Script: Active session: [1]
[email protected]
> 2016-03-08 13:35:45.296 Script: cd ..
. 2016-03-08 13:35:45.296 Cached directory change via ".." to "/".
. 2016-03-08 13:35:45.296 Getting current directory name.
< 2016-03-08 13:35:45.296 Script: /
> 2016-03-08 13:35:45.296 Script: cd ..
. 2016-03-08 13:35:45.296 Cached directory change via ".." to "/".
. 2016-03-08 13:35:45.296 Getting current directory name.
< 2016-03-08 13:35:45.296 Script: /
> 2016-03-08 13:35:45.296 Script: cd ..
. 2016-03-08 13:35:45.296 Cached directory change via ".." to "/".
. 2016-03-08 13:35:45.296 Getting current directory name.
< 2016-03-08 13:35:45.296 Script: /
> 2016-03-08 13:35:45.296 Script: put "C:\tmp\TestData\D100817.bat"
. 2016-03-08 13:35:45.327 Copying 1 files/directories to remote directory "/"
. 2016-03-08 13:35:45.327 PrTime: Yes; PrRO: No; Rght: rw-r--r--; PrR: No (No); FnCs: N; RIC: 0100; Resume: S (102400); CalcS: No; Mask:
. 2016-03-08 13:35:45.327 TM: B; ClAr: No; CPS: 0; InclM:
. 2016-03-08 13:35:45.327 AscM: *.*html; *.htm; *.txt; *.php; *.php3; *.cgi; *.c; *.cpp; *.h; *.pas; *.bas; *.tex; *.pl; .htaccess; *.xtml; *.css; *.cfg; *.ini; *.sh; *.xml
. 2016-03-08 13:35:45.327 File: "C:\tmp\TestData\D100817.bat"
* 2016-03-08 13:35:45.390 (EOSError) System Error. Code: 2.
* 2016-03-08 13:35:45.390 The system cannot find the file specified
. 2016-03-08 13:35:45.390 Asking user:
. 2016-03-08 13:35:45.390 File or folder 'C:\tmp\TestData\D100817.bat' does not exist. ("System Error. Code: 2.
. 2016-03-08 13:35:45.390 The system cannot find the file specified")
< 2016-03-08 13:35:45.390 Script: File or folder 'C:\tmp\TestData\D100817.bat' does not exist.
< 2016-03-08 13:35:45.390 Script: System Error. Code: 2.
< 2016-03-08 13:35:45.390 The system cannot find the file specified
* 2016-03-08 13:35:49.874 (EScpSkipFile) File or folder 'C:\tmp\TestData\D100817.bat' does not exist.
* 2016-03-08 13:35:49.874 System Error. Code: 2.
* 2016-03-08 13:35:49.874 The system cannot find the file specified
. 2016-03-08 13:35:49.874 Script: Failed
> 2016-03-08 13:35:49.874 Script: exit
. 2016-03-08 13:35:49.874 Script: Exit code: 1
. 2016-03-08 13:35:49.874 Disconnected from server