User to user discussion and support for UltraEdit, UEStudio, UltraCompare, and other IDM applications.

Help with writing and running scripts
3 posts Page 1 of 1
Hi to all.

Is there a way to "copy" only the path of an open file?

I use path command but whole "path/filename" is copied.

And how to replace when I copy this path?

Example: "/" replace using "\\".

Thanks
Yes, with a script containing function GetFilePath from General file name evaluating functions collection and having additionally the line

Code: Select all
UltraEdit.clipboardContent = GetFilePath();

This line assigns the file path string of active file returned by the function to currently active clipboard. This single line requires UE ≥ v14.20 or UES ≥ v09.00.

I don't understand your second question. But replaces of characters within a JavaScript string is supported by JavaScript core, see replace function of JavaScript's String object.
Best regards from Austria
Thanks Mofi once again....
3 posts Page 1 of 1
cron