"Copy Link Location"

Advertisement

Guest

"Copy Link Location"

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

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
40,476
Location:
Prague, Czechia

Re: "Copy Link Location"

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.

Reply with quote

Guest

Re: "Copy Link Location"

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
<invalid hyperlink removed by admin>

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

Reply with quote

martin
Site Admin
martin avatar
Joined:
Posts:
40,476
Location:
Prague, Czechia

Re: "Copy Link Location"

I guess you can implement what you ask for using custom command feature (see Preferences/Commands).

Add new 'remote' command like:
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

Reply with quote

Advertisement

You can post new topics in this forum