Content plugin: URL

Discuss and announce Total Commander plugins, addons and other useful tools here, both their usage and their development.

Moderators: Hacker, petermad, Stefan2, white

Post Reply
sashole
Junior Member
Junior Member
Posts: 3
Joined: 2005-04-07, 12:28 UTC

Content plugin: URL

Post by *sashole »

Please forgive me if this is covered elsewhere, i was unable to locate a topic for this.

Using one of the content plugins, viz. filediz, is it possible to arrange a view for *.urls to include only the baseurl or the internetshortcut rather than the whole stream of information contained in the file something.url?

For instance:
Name Description
========== ====================
something.url http://www.psy.pdx.edu/...

I tried filediz.longDescription, but wasnt able to parse out the items i wanted to view.

I have url as a text...

Any help would be appreciated.
User avatar
Lev
Junior Member
Junior Member
Posts: 82
Joined: 2004-12-14, 13:08 UTC

Post by *Lev »

You can do it with Script Content Plugin
add the following code to ext.vbs:

Code: Select all

case "url"
Set f = fso.GetFile(filename)
Set ts = fso.OpenTextFile(filename, ForReading)
s = ts.read(1000)
ts.Close

re.Pattern = "URL=(.*)"
if re.Test(s) then
Set tt = re.Execute(s)
content= re.replace (tt(0),"$1")
End if 
User avatar
Alextp
Power Member
Power Member
Posts: 2321
Joined: 2004-08-16, 22:35 UTC
Location: Russian Federation
Contact:

Post by *Alextp »

2sashole
I'm author of FileDiz plugin. With current version (latest from totalcmd.net) you can do the following: add to FileDiz.ini:

Code: Select all

[Extensions]
Text=txt diz url

[Replaces]
S1=[InternetShortcut]=
S2=URL=
This will strip unneeded strings from .url files.
I can also add this as a feature to the next plugin version, if you want.
sashole
Junior Member
Junior Member
Posts: 3
Joined: 2005-04-07, 12:28 UTC

Post by *sashole »

Thanks to you both for your responses. I had not seen the script content plugin so I appreciate you pointing me in that direction. I found it very helpful. Alextp: thank you for suggesting the text replacements. I will try that out...
Post Reply