Topic "COPY A REMOTE FOLDER _ HOW WITHOUT INCLUDING SUBFOLDER NAME"

Author Message
PerplexedBelgian
[View user's profile]

Joined: 2011-08-24
Posts: 4
Assume I have files F0x on the remote server in folder R01 and I want them to be copied to my local folder L01. At this stage, they get copied into L01\R01\F0x, whereas I would like to copy them to L01\F0x.
Advertisements
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24555
Location: Prague, Czechia
Are you using scripting? What is your script like now?
_________________
Martin Prikryl
PerplexedBelgian
[View user's profile]

Joined: 2011-08-24
Posts: 4
No, I'm not. Just "copying" in commander mode.

I have no problem scripting, could you tell me how I could achieve what I need?

Thank you very much and kind regards,

Marc
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24555
Location: Prague, Czechia
Please post a full log file showing the problem.

To generate log file, enable logging, log in to your server and do the operation and only the operation that causes the error. For posting extensive logs you may use pastebin or similar application. 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.
_________________
Martin Prikryl
PerplexedBelgian
[View user's profile]

Joined: 2011-08-24
Posts: 4
[quote="prikryl"]Please post a full log file showing the problem.

How this is going to help you answer a very simple question is beyond me, but here goes. My problem in this particular example is that I am copying the folder (in this case 110282656207) and that this folder is created on my local drive. I would like that it would not.

Thanks for caring and kind regards;



File: "/Universal_Pacific/110282656207/5131717601.pdf"
Copying "/Universal_Pacific/110282656207/5131717601.pdf" to local directory started.
Binary transfer mode selected.
Checking existence of partially transfered file.
Opening remote file.
Type: SSH_FXP_OPEN, Size: 63, Number: 223747
Type: SSH_FXP_STATUS, Size: 24, Number: 223492
Discarding reserved response
Type: SSH_FXP_HANDLE, Size: 13, Number: 223747
Type: SSH_FXP_FSTAT, Size: 13, Number: 224008
Type: SSH_FXP_READ, Size: 25, Number: 224261
3 skipped SSH_FXP_WRITE, SSH_FXP_READ, SSH_FXP_DATA and SSH_FXP_STATUS packets.
Type: SSH_FXP_ATTRS, Size: 37, Number: 224008
Storing reserved response
Status code: 1
59 skipped SSH_FXP_WRITE, SSH_FXP_READ, SSH_FXP_DATA and SSH_FXP_STATUS packets.
Type: SSH_FXP_CLOSE, Size: 13, Number: 232708
Type: SSH_FXP_STATUS, Size: 28, Number: 231941
Type: SSH_FXP_STATUS, Size: 28, Number: 232197
Type: SSH_FXP_STATUS, Size: 28, Number: 232453
File: "/Universal_Pacific/110282656207/5131717659.pdf"
Copying "/Universal_Pacific/110282656207/5131717659.pdf" to local directory started.
Binary transfer mode selected.
Checking existence of partially transfered file.
Opening remote file.
Type: SSH_FXP_OPEN, Size: 63, Number: 232963
Type: SSH_FXP_STATUS, Size: 24, Number: 232708
Discarding reserved response
Type: SSH_FXP_HANDLE, Size: 13, Number: 232963
Type: SSH_FXP_FSTAT, Size: 13, Number: 233224
Type: SSH_FXP_READ, Size: 25, Number: 233477
3 skipped SSH_FXP_WRITE, SSH_FXP_READ, SSH_FXP_DATA and SSH_FXP_STATUS packets.
Type: SSH_FXP_ATTRS, Size: 37, Number: 233224
Storing reserved response
Status code: 1
31 skipped SSH_FXP_WRITE, SSH_FXP_READ, SSH_FXP_DATA and SSH_FXP_STATUS packets.
Type: SSH_FXP_CLOSE, Size: 13, Number: 238340
Type: SSH_FXP_STATUS, Size: 28, Number: 237573
Type: SSH_FXP_STATUS, Size: 28, Number: 237829
Type: SSH_FXP_STATUS, Size: 28, Number: 238085
File: "/Universal_Pacific/110282656207/5131717704.pdf"
Copying "/Universal_Pacific/110282656207/5131717704.pdf" to local directory started.
Binary transfer mode selected.
Checking existence of partially transfered file.
Opening remote file.
Type: SSH_FXP_OPEN, Size: 63, Number: 238595
Type: SSH_FXP_STATUS, Size: 24, Number: 238340
Discarding reserved response
Type: SSH_FXP_HANDLE, Size: 13, Number: 238595
Type: SSH_FXP_FSTAT, Size: 13, Number: 238856
Type: SSH_FXP_READ, Size: 25, Number: 239109
3 skipped SSH_FXP_WRITE, SSH_FXP_READ, SSH_FXP_DATA and SSH_FXP_STATUS packets.
Type: SSH_FXP_ATTRS, Size: 37, Number: 238856
Storing reserved response
Status code: 1
29 skipped SSH_FXP_WRITE, SSH_FXP_READ, SSH_FXP_DATA and SSH_FXP_STATUS packets.
Type: SSH_FXP_CLOSE, Size: 13, Number: 243716
Type: SSH_FXP_STATUS, Size: 28, Number: 242949
Type: SSH_FXP_STATUS, Size: 28, Number: 243205
Type: SSH_FXP_STATUS, Size: 28, Number: 243461
File: "/Universal_Pacific/110282656207/5131717783.pdf"
Copying "/Universal_Pacific/110282656207/5131717783.pdf" to local directory started.
Binary transfer mode selected.
Checking existence of partially transfered file.
Opening remote file.
Type: SSH_FXP_OPEN, Size: 63, Number: 243971
Type: SSH_FXP_STATUS, Size: 24, Number: 243716
Discarding reserved response
Type: SSH_FXP_HANDLE, Size: 13, Number: 243971
Type: SSH_FXP_FSTAT, Size: 13, Number: 244232
Type: SSH_FXP_READ, Size: 25, Number: 244485
3 skipped SSH_FXP_WRITE, SSH_FXP_READ, SSH_FXP_DATA and SSH_FXP_STATUS packets.
Type: SSH_FXP_ATTRS, Size: 37, Number: 244232
Storing reserved response
Status code: 1
31 skipped SSH_FXP_WRITE, SSH_FXP_READ, SSH_FXP_DATA and SSH_FXP_STATUS packets.
Type: SSH_FXP_CLOSE, Size: 13, Number: 249348
Type: SSH_FXP_STATUS, Size: 28, Number: 248581
Type: SSH_FXP_STATUS, Size: 28, Number: 248837
Type: SSH_FXP_STATUS, Size: 28, Number: 249093
File: "/Universal_Pacific/110282656207/5131718402.pdf"
Copying "/Universal_Pacific/110282656207/5131718402.pdf" to local directory started.
Binary transfer mode selected.
Checking existence of partially transfered file.
Opening remote file.
Type: SSH_FXP_OPEN, Size: 63, Number: 249603
Type: SSH_FXP_STATUS, Size: 24, Number: 249348
Discarding reserved response
Type: SSH_FXP_HANDLE, Size: 13, Number: 249603
Type: SSH_FXP_FSTAT, Size: 13, Number: 249864
Type: SSH_FXP_READ, Size: 25, Number: 250117
3 skipped SSH_FXP_WRITE, SSH_FXP_READ, SSH_FXP_DATA and SSH_FXP_STATUS packets.
Type: SSH_FXP_ATTRS, Size: 37, Number: 249864
Storing reserved response
Status code: 1
31 skipped SSH_FXP_WRITE, SSH_FXP_READ, SSH_FXP_DATA and SSH_FXP_STATUS packets.
Type: SSH_FXP_CLOSE, Size: 13, Number: 254980
Type: SSH_FXP_STATUS, Size: 28, Number: 254213
Type: SSH_FXP_STATUS, Size: 28, Number: 254469
Type: SSH_FXP_STATUS, Size: 28, Number: 254725
Guest




PerplexedBelgian wrote:
No, I'm not. Just "copying" in commander mode.

...if you are dragging & dropping the "R01" folder from the remote side to the local side, that will, as you have seen, include "R01" on the local side -- you told it to copy the folder, so it did. However, if you go into the folder, by double-clicking on it, then select everything inside it & drag that over to the local side, that would copy everything inside the folder & avoid copying the "R01" folder itself.

Also, prikryl said "Are you using scripting?"...he was just asking, it's not that you have to use scripting to achieve this, he just wondered if you were already trying to use scripting. But it would be the same with scripting, copy the contents of "R01" instead of the folder itself.
PerplexedBelgian
[View user's profile]

Joined: 2011-08-24
Posts: 4
Anonymous wrote:
PerplexedBelgian wrote:
No, I'm not. Just "copying" in commander mode.

...if you are dragging & dropping the "R01" folder from the remote side to the local side, that will, as you have seen, include "R01" on the local side -- you told it to copy the folder, so it did. However, if you go into the folder, by double-clicking on it, then select everything inside it & drag that over to the local side, that would copy everything inside the folder & avoid copying the "R01" folder itself.

Also, prikryl said "Are you using scripting?"...he was just asking, it's not that you have to use scripting to achieve this, he just wondered if you were already trying to use scripting. But it would be the same with scripting, copy the contents of "R01" instead of the folder itself.


Understood. I thought I was missing some kind of setting whereby you could ask to just copy the files without the folder. I know now that there is not something like that, no big deal.

When you copy files localy from one folder to another, you can specify if you want the folder hierarchy to be copied as well or not. I was hoping to find something similar here. As I said, I'll live.

Thank you very much.
Advertisements

You can post new topics in this forum






Search Site

What is WinSCP?

It is award-winning SFTP client, SCP client, FTPS client and FTP client integrated into one software program for file transfer to FTP server or secure SFTP server. [More]

And it's free!

Donate

About donations

$9   $19   $49   $99

About donations

Recommend

WinSCP Privacy Policy

WinSCP License