|
CreateURL
|
Title
|
CreateURL
|
File Name
|
CreateURL.txt
|
Description
|
Create url-file with path from clipboard or target panel
|
Author
|
Vochomurka
|
Parameters
|
%P, %T
|
Plugins Called
|
file, clip, win
|
Icon
|
|
Version
|
1.1
|
Updated on
|
15.11.2017
|
args Path, Target
local Name = input("Enter file name (no extension):")
if(not Name)
quit
local C = clip.get
if(validpath(C))
Target = C
local fh = file.open(Path ++ "\" ++ Name ++ ".url", "w")
if(fh <= 0) do
messagebox("ok error", "File not opened", "FILE plugin error #1")
quit
endif
fh.writeline("[InternetShortcut]")
fh.writeline("URL=" ++ Target)
fh.close
win.sendmessage(win.handle("c=TTOTAL_CMD"), 0x400+51, 540, 0)
Comments
Main application of files with the url extension is to open a specific web page in browser. In the 9th version of Total Commander these files got another role: open a local path in active panel.
If the clipboard contains some valid path, it is written to the *.url file. Otherwise the target panel path is used.