Issue with -append switch and SFTP
We are in the process of translating several scripts that were previously utilizing FTP in to SFTP using WinSCP.
A couple of my scripts use the append ftp command. This is supposed to be equivalent to the "put -append" command, but it is not working. It simply overwrites the existing file with information from the new file, but not the whole file.
Example:
FileA.txt
1111
2222
3333
FileB.txt
4444
5555
Command:
winscp.com /command "option batch abort" "option confirm off" "open sftp://user:password@servre/" "cd directory" "put -append FileB.txt FileA.txt" "exit"
Result:
4444
5555
3333
Any ideas?
A couple of my scripts use the append ftp command. This is supposed to be equivalent to the "put -append" command, but it is not working. It simply overwrites the existing file with information from the new file, but not the whole file.
Example:
FileA.txt
1111
2222
3333
FileB.txt
4444
5555
Command:
winscp.com /command "option batch abort" "option confirm off" "open sftp://user:password@servre/" "cd directory" "put -append FileB.txt FileA.txt" "exit"
Result:
4444
5555
3333
Any ideas?