Hello 2
AndrasB and welcome.
You can do such things with an script, for example here with AutoHotkey:
Code: Select all
; 2022-10-05 Wed 17:00:31 by Stefan2
; unix path of sftp connection to clipboard.ahk
; https://ghisler.ch/board/viewtopic.php?p=421695#p421695
; The path looks like that: \\\Secure FTP\name_of_connection\path\to\directory\
; Wanted path looks like : /path/to/directory/
;----------------------------------
;History.txt 9b1 wrote:
;08.06.16 Added: Send WM_USER+50 (=1074) with wparam set to 1000..1012 to get index of first file, first item, current item, number of items, active panel
;08.06.16 Added: Send WM_USER+50 with wparam=1..29 -> returns window handle of control.
;Get active panel with '1000': Return 1=left TMyListBox2 , Return 2=right TMyListBox1
;----------------------------------
SendMessage 1074, 1000, 0, , ahk_class TTOTAL_CMD
ActivePanel = %ErrorLevel%
If(ActivePanel=1)
{
;ActivePanel=TMyListBox2
;LEFT , get 9=leftpath
wparam = 9
}else{
;ActivePanel=TMyListBox1
;RIGHT , get 10=rightpath
wparam = 10
}
;----------------------------------
SendMessage 1074, %wparam%, 0, , ahk_class TTOTAL_CMD
iErrorLevel = %ErrorLevel% ;e.g. currently '68032'
ControlGetText, strReturnFromTC, , ahk_id %iErrorLevel%
;
MsgBox DEBUG`n`n%strReturnFromTC%
; //---------------------------
; //unix path of sftp connection to clipboard.ahk
; //---------------------------
; //DEBUG
; //
; //C:\temp\PurgedFiles\*.*
; //---------------------------
; //OK
; //---------------------------
;
;----------------------------------
OldStr := strReturnFromTC
;just for an test:
OldStr := "\\\Secure FTP\name_of_connection\path to my\directory\*.*"
;----------------------------------
; or: use an loop here to read TCs' "%L"-list and process that list line-by-line
;----------------------------------
; \\\Secure FTP\name_of_connection\path\to\directory\
NewStr := RegExReplace(OldStr, "^\\\\\\.+?\\.+?\\(.+)$","$1" )
StringReplace, NewStr, NewStr, \ , /, all
StringReplace, NewStr, NewStr, *.* ,
;----------------------------------
MsgBox DEBUG`n`nOLD:`t %OldStr%`nNEW:`t %NewStr%
; //---------------------------
; //unix path of sftp connection to clipboard.ahk
; //---------------------------
; //DEBUG
; //
; //OLD: \\\Secure FTP\name_of_connection\path to my\directory\*.*
; //NEW: path to my/directory/
; //---------------------------
; //OK
; //---------------------------
;
strOUT = %strOUT%%NewStr%`r`n
;----------------------------------
;//OUTPUT:
;StringTrimRight, strOUT, strOUT, 2
;Clipboard := strOUT
;----------------------------------
automate/script TC with AutoHotkey AHK
viewtopic.php?p=350976#p350976
TC9: "Send WM_USER+50 with wparam" - how-to? (Just some basic examples with AutoHotkey AHK)
viewtopic.php?t=44451
I don't know what you know about AHK and scripting, so just ask here for further advice....
But I think I had not understood your wish correctly?