get -delete *.pdf errors No such file or directory.

Advertisement

coyote120
Guest

get -delete *.pdf errors No such file or directory.

WinSCP version 5.7.6 ( build 5874)
Windows 2008 r2

I'm getting a (No such file or directory.) error message when I run get -Delete *.pdf
server is reporting file not found.

Get *.pdf works fine all files download but nothing is removed from the server.


here is the script

# - Batch call key
# - %1% = Username (i.e. cernerasp\rm9582)
# - %2% = Password
# - %3% = Target server directory path
# - %4% = Local drive (i.e. c: or t:)
# - %5% = Directory name for use (i.e. \temp)
# - %6% = What the file starts with
# - %7% = SFTP server IP address
# - %8% = SFTP server port

# Automatically abort script on errors
option batch abort

# Disable overwrite confirmations that conflict with the previous
option confirm off

# - Set the local drive letter
lcd %4%

# - CD to local directory
lcd %5%

#Open connection to ftp server
open sftp://%1%:%2%@%7%:%8%

#CD to directory on remote server
cd %3%

#Obtain files locally and remove them from the server
#
get -delete %6%
#Close the session and exit out

close
exit


Here is the log file.

. 2015-12-01 10:29:28.709 Deleting file "/RMCC_UT/PROD/CentralIntakePDF/centralintakepdf-20151119_155655.pdf".
> 2015-12-01 10:29:28.709 Type: SSH_FXP_REMOVE, Size: 76, Number: 3597
< 2015-12-01 10:29:28.771 Type: SSH_FXP_STATUS, Size: 21, Number: 3332
. 2015-12-01 10:29:28.771 Discarding reserved response
< 2015-12-01 10:29:28.834 Type: SSH_FXP_STATUS, Size: 33, Number: 3597
< 2015-12-01 10:29:28.834 Status code: 2, Message: 3597, Server: File not found, Language: en
. 2015-12-01 10:29:28.834 Asking user:
. 2015-12-01 10:29:28.834 Error deleting file '/RMCC_UT/PROD/CentralIntakePDF/centralintakepdf-20151119_155655.pdf'. ("No such file or directory.
. 2015-12-01 10:29:28.834 Error code: 2
. 2015-12-01 10:29:28.834 Error message from server (en): File not found")
< 2015-12-01 10:29:28.834 Script: Error deleting file '/RMCC_UT/PROD/CentralIntakePDF/centralintakepdf-20151119_155655.pdf'.
< 2015-12-01 10:29:28.834 Script: No such file or directory.
< 2015-12-01 10:29:28.834 Error code: 2
< 2015-12-01 10:29:28.834 Error message from server (en): File not found
. 2015-12-01 10:29:28.834 Script: Failed
. 2015-12-01 10:29:28.834 Script: Exit code: 1
. 2015-12-01 10:29:28.834 Closing connection.
. 2015-12-01 10:29:28.834 Sending special code: 12
. 2015-12-01 10:29:28.834 Sent EOF message

Reply with quote

Advertisement

Guest

Re: get -delete *.pdf errors No such file or directory.

martin wrote:

Can you download the file and delete it manually afterwards in GUI?

Yes, thank you!
However, I can not delete the files created by my vendors application processes.
I'm going to assume that it's a rights issue on my vendors server.

Reply with quote

Advertisement

You can post new topics in this forum