Topic "Sync Soft Links: Full Path = Error, Rel Path = Deep Copy"

Author Message
[View user's profile]

Joined: 2011-09-26
Posts: 6
Version: 4.3.5 - Build 1463
Windows 7 Ultimate x64
SCP Protocol

I'll give some setup and the error I get, and then I guess you could call it a feature request, but I've provided the way I'd like WinSCP to handle to be handling this. If a log would be helpful, I'm happy to generate one, but figure not to clog your email (since I'm sure you get plenty in a day) unless it would prove useful.

Some setup:
I am using the following synchronize command to copy the remote files to a local copy for myself:
winscp.exe /console /command "open MSI_ELMO" "synchronize -delete local C:\comp "
and the session opens directly to my root directory (which for completeness is actually at /home/elmo1/username, which I'll reference as ~)

I have a folder ~/exps/a/ref which has reference information that many other folders have a soft link to exps/b/softref, exps/l/softref. I've noticed that I have created links to the reference folder through both a full path "ln -s ~/exps/a/ref softref" and also relative (maybe from exps/b for example) "ln -s ../a/ref softref"

Error - Soft Links with a Full Path:
When it comes to synchronizing the full path soft links, an error arises of "Received error message from remote side: 'scp:/home/elmo1/username/exps/b/softref/softref: No such file or directory" Which is correct that folder does not exist

Different Outcome - Soft Links with a Relative Path:
However, when it synchronizes a relative path soft link, it creates a folder named softref, and then copies the entire contents of the ref folder into softref. So it can resolve the path correctly, but this is also undesirable as this ref folder is softlinked in many different exps folders. So now on my local computer I'm taking up extra space for all these copies throughout the file system (currently ~1gb extra space, but the number of softref and the data stored in ref will continue to only grow).

How I had imagined WinSCP would process soft links:
The ideal behavior I'd like to see WinSCP take is to create shortcuts to the reference folder on my windows system not full copies of the folder contents. I can see that solution easily for the relative file paths, as I imagine traversing up in windows is similar to that of linux.

For the full path soft links, I'm not sure the best way to extract the root path that is being used. But if I cd ~ then pwd, I get the /home/elmo1/username string, which would be tied to the root of the local directory I'm synchronizing to. So the /home/elmo1/username in a soft link would be equivalent to the C:\comp directory in my case.

Thank you for your continued development and assistance.

[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24736
Location: Prague, Czechia
Thanks for your suggestions. I'll consider the best solution.
Martin Prikryl

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!


About donations

$9   $19   $49   $99

About donations


WinSCP Privacy Policy

WinSCP License