The command "CopyFilePath" is great for local/network files.
However for FTP opened files, the string returned is not a "real" name that one can use at a OS prompt.
The string received is a special UE format of:
FTP::{yourftpaccount}\/path/path/path|filename.ext
Basically two search replace commands can convert the above into the true/correct filename.
1) remove everything between the "FTP::" and the "\" (backslash)
2) convert the vertical bar to a slash.
The following macro is somewhat functional but not perfect because it uses a temp file
the macrow as written may, (or may not), return you to the correct tab/edit point from which you came.
My questions are:
If I could find/replace within a clipboard I would have neither issue.
Is this possible?
Am I re-inventing the wheel here - does anyone have a better way?
However for FTP opened files, the string returned is not a "real" name that one can use at a OS prompt.
The string received is a special UE format of:
FTP::{yourftpaccount}\/path/path/path|filename.ext
Basically two search replace commands can convert the above into the true/correct filename.
1) remove everything between the "FTP::" and the "\" (backslash)
2) convert the vertical bar to a slash.
The following macro is somewhat functional but not perfect because it uses a temp file
the macrow as written may, (or may not), return you to the correct tab/edit point from which you came.
My questions are:
If I could find/replace within a clipboard I would have neither issue.
Is this possible?
Am I re-inventing the wheel here - does anyone have a better way?
Code: Select all
InsertMode
ColumnModeOn
HexOff
Clipboard 6
CopyFilePath
NewFile
Paste
Clipboard 0
UltraEditReOn
Find RegExp "FTP::*\"
Replace All ""
UltraEditReOn
Find "|"
Replace All "/"
Key HOME
Key SHIFT
StartSelect
Key END
EndSelect
Cut
CloseFile NoSave