some files are not getting uploaded
Hello,
I have a batch file that runs every 5 minutes to upload a batch of .txt files to only one server. From time to time, I notice that sometimes not all files are uploaded in a single transfer!
For example, i had a batch of 19 txt files, 18 of them get uploaded. Only one of them didn't! And no error was generated. as if though it has skipped the files.
in the attached log file, you will notice that 18 files were uploaded successfully, but 19 files were deleted from the SFTP server. Tha means that one file was not uploaded!
the file name is: DRLL-SAL-25102018-14.txt
what could be the reason? how to resolve the issue?
WinSCP 5.11.3
Protocol SFTP, port 22
Local machine:
OS Name: Microsoft Windows Server 2012 R2
Using scripting/automation.
The batch file flow is as follows:
1- connect to SFTP server.
2- change local directory.
3- transfer all .txt files.
4- Delete all files from SFTP server.
please check the contents of my batch file:
Batch file content:
@echo off
CD "C:\Program Files (x86)\WinSCP"
Winscp.com /log="\\dfs1\root\loc_Apps\WinSCP_Log\b2b_upload.txt" /logsize=10*100M /ini=nul /script=E:\B2B_job\uploadscript.txt
uploadscript.txt content:
option echo off
option batch on
option confirm off
open sftp://b2bsal_dfs:file@X.X.X.X/ -hostkey="ssh-rsa 2048 ea:e2:15:f7:gh:27:65:ad:87:45:3c:9e:4c:e8:a5:b8"
lcd //dfs1/root/Shared3/B2B_SAL
get -nopreservetime -nopermissions -resumesupport=on *
rm *
exit
I have a batch file that runs every 5 minutes to upload a batch of .txt files to only one server. From time to time, I notice that sometimes not all files are uploaded in a single transfer!
For example, i had a batch of 19 txt files, 18 of them get uploaded. Only one of them didn't! And no error was generated. as if though it has skipped the files.
in the attached log file, you will notice that 18 files were uploaded successfully, but 19 files were deleted from the SFTP server. Tha means that one file was not uploaded!
the file name is: DRLL-SAL-25102018-14.txt
what could be the reason? how to resolve the issue?
WinSCP 5.11.3
Protocol SFTP, port 22
Local machine:
OS Name: Microsoft Windows Server 2012 R2
Using scripting/automation.
The batch file flow is as follows:
1- connect to SFTP server.
2- change local directory.
3- transfer all .txt files.
4- Delete all files from SFTP server.
please check the contents of my batch file:
Batch file content:
@echo off
CD "C:\Program Files (x86)\WinSCP"
Winscp.com /log="\\dfs1\root\loc_Apps\WinSCP_Log\b2b_upload.txt" /logsize=10*100M /ini=nul /script=E:\B2B_job\uploadscript.txt
uploadscript.txt content:
option echo off
option batch on
option confirm off
open sftp://b2bsal_dfs:file@X.X.X.X/ -hostkey="ssh-rsa 2048 ea:e2:15:f7:gh:27:65:ad:87:45:3c:9e:4c:e8:a5:b8"
lcd //dfs1/root/Shared3/B2B_SAL
get -nopreservetime -nopermissions -resumesupport=on *
rm *
exit