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
Icon
Version 1.0
Updated on 23.06.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

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.


Main Page Total Commander PowerPro