Post a reply

Before posting, please read how to report bug or request support effectively.

Bug reports without an attached log file are usually useless.

Options
Add an Attachment

If you do not want to add an Attachment to your Post, please leave the Fields blank.

(maximum 10 MB; please compress large files; only common media, archive, text and programming file formats are allowed)

Options

Topic review

Guest

Re: Cannot download using sftp

ok.Is there any way i can copy the file if it exists in any subfolder.What i am trying to do is user will enter file name and it needs to be copied to local server .The file can reside in any folder/subfolder
martin

Re: Cannot download using sftp

roshan wrote:

How can i just copy the file and not folder and subfolder structure.

You cannot.
roshan

Re: Cannot download using sftp

Hi :

I fixed it. But when i run the command it copies folder and subfolders.How can i just copy the file and not folder and subfolder structure. .The command is below:-

get -filemask=FULL_us_chhc_*2013*.txt /pc/user1/backup/backup/backup/* c:\

Regards,
Roshan
martin

Re: Cannot download using sftp

Please attach a full log file showing the problem (using the latest version of WinSCP).

To generate log file, use /log=path_to_log_file command-line argument. Submit the log with your post as an attachment. Note that passwords and passphrases not stored in the log. You may want to remove other data you consider sensitive though, such as host names, IP addresses, account names or file names (unless they are relevant to the problem). If you do not want to post the log publicly, you may email it to me. You will find my address (if you log in) in my forum profile. Please include link back to this topic in your email. Also note in this topic that you have emailed the log.
roshan

Cannot download using sftp

Hi:

I want to download file automatically.I saved this script in .txt file and call the .txt file in command prompt:-

# Automatically abort script on errors
option batch abort
# Disable overwrite confirmations that conflict with the previous
option confirm off

# Connect
open "CDN" -hostkey="ssh-rsa 1024 fe:8f:d9:c0:5b:a4:f8:bf:91:4f:80:41:36:7b:38:87"
# Change remote directory
cd /home/user
# Force binary mode transfer
option transfer binary
# Download file to the local directory d:\
get test.txt c:\
# Disconnect
close
# Exit WinSCP
exit

I can see that it is connecting but it doesnt copy file to c:\.Any idea where is the problem