local and web links retrieval

Discuss and share scripts and script files...
Post Reply
neutrox
Posts: 194
Joined: 05 Mar 2012 15:23

local and web links retrieval

Post by neutrox »

how could xyplorer read a file and extract

a. all web links contained?

b. all local paths, files only?

b1. local paths, folders only?

highend
Posts: 14639
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

Re: local and web links retrieval

Post by highend »

As usual: via regex(es)

Google can find enough sites that list well formed regexes for such purposes.
One of my scripts helped you out? Please donate via Paypal

neutrox
Posts: 194
Joined: 05 Mar 2012 15:23

Re: local and web links retrieval

Post by neutrox »

the matches were making the results to disappear instead of preserving them for further report.

neutrox
Posts: 194
Joined: 05 Mar 2012 15:23

Re: local and web links retrieval

Post by neutrox »

help.

highend
Posts: 14639
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

Re: local and web links retrieval

Post by highend »

the matches were making the results to disappear
Which matches and with which regexes?
One of my scripts helped you out? Please donate via Paypal

Marco
Posts: 2354
Joined: 27 Jun 2011 15:20

Re: local and web links retrieval

Post by Marco »

I think the workflow should be as follows:

1. with regexreplace find all the desired links and substitute them with "<startoflink>$1<endoflink>"
2. with regexreplace subtitute everything that matches "<endoflink>.*<startoflink>" with "\n\r"
2bis. with regexreplace delete "^.*<startoflink>"
2ter. with regexreplace delete "<endoflink>.*$"
3. then run a foreach loop to process every link

Not tested. Also you should set the option that makes the dot match newlines as well.
Tag Backup - SimpleUpdater - XYplorer Messenger - The Unofficial XYplorer Archive - Everything in XYplorer
Don sees all [cit. from viewtopic.php?p=124094#p124094]

neutrox
Posts: 194
Joined: 05 Mar 2012 15:23

Re: local and web links retrieval

Post by neutrox »

C:\Documents and Settings\NetworkService\Application Data\Microsoft\Credentials\Local Links.txt

which have links pointing to several documents like

D:\Programs\GridinSoft Notepad\license.txt

among other guidance text

or simply

D:\Thread or D:\Documents\ (some have trailing "\", some do not).

the source for web links may be similar .txt or .html files. Sometimes they come between ( " ), ( ' ) or simply put as

http://www.xyplorer.com.

when I find a pattern which covers a situation it ignores the others. when it covers the result displays everything BUT the wanted links, ie, i end with a negative result.

Post Reply