Topic ""Copy Link Location""

Author Message
Guest




I would like to be able to pick a file in a WinSCP window, right click and pick "Copy Link Location" and on my clipboard I would get a link like

sftp://somehost.com/dir/to/a/file.txt

So that I may paste that in an email and have others who have winSCP be able to click that and get it to load up.

myers
Advertisements
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24512
Location: Prague, Czechia
You can copy path to file (not URL) to clipboard. See File(s) menu.

Anyway WinSCP cannot handle URLs pointing to file yet, so even if you mail the URL, the others would be able just to click it to get it.
_________________
Martin Prikryl
Guest




I am sorr about the above.

It would like to be able to use perl or php regular expressions.
&PATH= home/user/public_html/file.jpg
&SEVER=somedomain.com
Required URL
http://somedomain.com/user/file.jp

Then if were were allowed to write a php expression

Click to link:
"http://".$SERVER.str_replace("home/user/public_html", "/~user", &PATH)

then it would be really great and time saving.

Tim
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24512
Location: Prague, Czechia
I guess you can implement what you ask for using custom command feature (see Preferences/Commands).

Add new 'remote' command like:
Code:
echo '<?="http://somedomain.com".str_replace("home/'`whoami`'/public_html", "~'`whoami`'", "'`pwd`'")."/!\n"?>' | php -q

and check 'show results in terminal' and 'apply to directories'.
The exclamation mark (!) will be replaced with name of file selected in the panel.

Note that the option 'show results in terminal' is new in yesterdays release 3.7
_________________
Martin Prikryl
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