Hi Martin, after looking into the script and making some changes. For some reason I don't ever see my file on the ftp can you guide me, the log file says it is transfered...
I have a file called deploy.bat which I double click.
Winscp.com /script=loadfile.txt /log=winscplog.txt
This is my loadfile.txt
open sftp://user:password@example.com/ -hostkey="ssh-rsa 1024 xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx"
cd /user/sysbatch/
put T:\prb\file_name_%TIMESTAMP-1D#yyyymmdd%.csv
close
This is my Log file.
. 2017-01-05 17:01:43.371 Using SFTP protocol.
. 2017-01-05 17:01:43.371 Doing startup conversation with host.
> 2017-01-05 17:01:43.371 Type: SSH_FXP_INIT, Size: 5, Number: -1
< 2017-01-05 17:01:43.449 Type: SSH_FXP_VERSION, Size: 33, Number: -1
. 2017-01-05 17:01:43.449 SFTP version 3 negotiated.
. 2017-01-05 17:01:43.449 Unknown server extension newline@vandyke.com="\n"
. 2017-01-05 17:01:43.449 We believe the server has signed timestamps bug
. 2017-01-05 17:01:43.449 We will use UTF-8 strings until server sends an invalid UTF-8 string as with SFTP version 3 and older UTF-8 strings are not mandatory
. 2017-01-05 17:01:43.449 Getting current directory name.
. 2017-01-05 17:01:43.449 Getting real path for '.'
> 2017-01-05 17:01:43.449 Type: SSH_FXP_REALPATH, Size: 10, Number: 16
< 2017-01-05 17:01:43.515 Type: SSH_FXP_NAME, Size: 75, Number: 16
. 2017-01-05 17:01:43.515 Real path is '/home/user'
. 2017-01-05 17:01:43.515 Startup conversation with host finished.
< 2017-01-05 17:01:43.515 Script: Active session: [1] user@example.com
> 2017-01-05 17:01:43.515 Script: cd /user/sysbatch/
. 2017-01-05 17:01:43.515 Cached directory change via "/user/sysbatch/" to "/home/user/sysbatch".
. 2017-01-05 17:01:43.515 Getting current directory name.
< 2017-01-05 17:01:43.515 Script: /home/user/sysbatch
> 2017-01-05 17:01:43.515 Script: put T:\prb\file_name_20170104.csv
. 2017-01-05 17:01:43.515 Copying 1 files/directories to remote directory "/home/user/sysbatch"
. 2017-01-05 17:01:43.515 PrTime: Yes; PrRO: No; Rght: rw-r--r--; PrR: No (No); FnCs: N; RIC: 0100; Resume: S (102400); CalcS: No; Mask:
. 2017-01-05 17:01:43.515 TM: B; ClAr: No; RemEOF: No; RemBOM: No; CPS: 0; NewerOnly: No; InclM: ; ResumeL: 0
. 2017-01-05 17:01:43.515 AscM: *.*html; *.htm; *.txt; *.php; *.php3; *.cgi; *.c; *.cpp; *.h; *.pas; *.bas; *.tex; *.pl; *.js; .htaccess; *.xtml; *.css; *.cfg; *.ini; *.sh; *.xml
. 2017-01-05 17:01:43.530 File: 'T:\prb\file_name_20170104.csv' [2017-01-05T05:00:15.785Z] [46434]
. 2017-01-05 17:01:43.546 Copying "T:\prb\file_name_20170104.csv" to remote directory started.
. 2017-01-05 17:01:43.546 Binary transfer mode selected.
. 2017-01-05 17:01:43.546 Opening remote file.
> 2017-01-05 17:01:43.546 Type: SSH_FXP_OPEN, Size: 87, Number: 259
< 2017-01-05 17:01:43.640 Type: SSH_FXP_HANDLE, Size: 31, Number: 259
> 2017-01-05 17:01:43.640 Type: SSH_FXP_WRITE, Size: 32764, Number: 774
. 2017-01-05 17:01:43.655 1 skipped SSH_FXP_WRITE, SSH_FXP_READ, SSH_FXP_DATA and SSH_FXP_STATUS packets.
> 2017-01-05 17:01:43.655 Type: SSH_FXP_CLOSE, Size: 31, Number: 1284
> 2017-01-05 17:01:43.655 Type: SSH_FXP_SETSTAT, Size: 83, Number: 521
< 2017-01-05 17:01:43.920 Type: SSH_FXP_STATUS, Size: 49, Number: 774
< 2017-01-05 17:01:44.201 Type: SSH_FXP_STATUS, Size: 49, Number: 1030
< 2017-01-05 17:01:44.201 Type: SSH_FXP_STATUS, Size: 40, Number: 1284
< 2017-01-05 17:01:44.201 Status code: 0
. 2017-01-05 17:01:44.201 Preserving timestamp [2017-01-05T05:00:15.000Z]
< 2017-01-05 17:01:44.201 Type: SSH_FXP_STATUS, Size: 40, Number: 521
< 2017-01-05 17:01:44.201 Status code: 0
. 2017-01-05 17:01:44.201 Transfer done: 'T:\prb\file_name_20170104.csv' [46434]
> 2017-01-05 17:01:44.201 Script: close
. 2017-01-05 17:01:44.201 Closing connection.
. 2017-01-05 17:01:44.201 Sending special code: 12
. 2017-01-05 17:01:44.201 Sent EOF message