Page 1 of 1

local and web links retrieval

Posted: 09 Dec 2012 16:08
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?

Re: local and web links retrieval

Posted: 09 Dec 2012 16:10
by highend
As usual: via regex(es)

Google can find enough sites that list well formed regexes for such purposes.

Re: local and web links retrieval

Posted: 09 Dec 2012 16:34
by neutrox
the matches were making the results to disappear instead of preserving them for further report.

Re: local and web links retrieval

Posted: 24 Dec 2012 12:38
by neutrox
help.

Re: local and web links retrieval

Posted: 24 Dec 2012 12:57
by highend
the matches were making the results to disappear
Which matches and with which regexes?

Re: local and web links retrieval

Posted: 24 Dec 2012 13:05
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.

Re: local and web links retrieval

Posted: 24 Dec 2012 13:58
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.