Get command not working

Advertisement

id10t
Joined:
Posts:
4

Get command not working

Hello,

I have setup a script that needs to bring over files from a remote directory to a local directory, ignore the Archive subfolder in the remote directory, and then delete the files in the remote directory after a successful transfer.

I cannot get the get command to work.
It states:
No such file or directory
Error Code: 2.
But I have both the Remote Directory and Local Directory set in the script (and also defined in the Advanced Site Settings Directories settings).

What I am doing wrong here?

I've pasted in the script below. Please let me know if you need anymore info.

Thanks.
#Set to batch mode
option batch continue
#No prompting
option confirm off
#Exclude sub folders
option exclude /*
#Open the Oracle_Test_Invoice session
open Oracle_Test_Invoices
lcd d:\groups\Oracle Invoices
get /GFI/ToWMS/IN/Invoice/*.*
exit

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
41,518
Location:
Prague, Czechia

Re: Get command not working

Is /GFI/ToWMS/IN/Invoice/ really a correct absolute path? Isn't the GFI a subfolder of your home directory?

If this does not help, please post log both from WinSCP script and from GUI (showing a successful download of the files you cannot download in the script).

Reply with quote

id10t
Joined:
Posts:
4

Hi Martin,

/GFI/ToWMS/IN/Invoice/ is the absolute path where the files are located in the remote directory (with an ARCHIVE sub directory that needs to be excluded).

I've attached the screenshots where it will successfully transfer from the GUI but not the script.

Please let me know if you need anything else.

WinSCP1.png

Reply with quote

Advertisement

Advertisement

You can post new topics in this forum