Sign in to follow this  
Followers 0
theguy0000

Getting All The Files In A Web Directory

8 posts in this topic

#1 ·  Posted (edited)

How would I get all the files in a web dirctory? (in this case, the directory is http://192.168.0.25/AutoNet/share)

Edited by theguy0000

The cake is a lie.www.theguy0000.com is currentlyUP images.theguy0000.com is currentlyUP all other *.theguy0000.com sites are DOWN

Share this post


Link to post
Share on other sites



....... :)

I mean getting a list of all the files using autoit...


The cake is a lie.www.theguy0000.com is currentlyUP images.theguy0000.com is currentlyUP all other *.theguy0000.com sites are DOWN

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

This should work... All that needs to be done is parse out the filenames and hope anonymous ftp is enabled.

$url=''; fill in with one of the above
$IE_test=_IECreate()
_IENavigate($IE_test,$url)
$dir=_IEDocReadHTML($IE_test)
_IEQuit($IE_test)
$IE_test=0

; $dir contains source, just parse out filenames

;===============================================================================
;
; Function Name:    _IEDocReadHTML()
; Description:      Retrieves the full HTML source of a document
; Parameter(s):  $o_object   - InternetExplorer.Application, Window or Frame object
; Requirement(s):   AutoIt3 Beta with COM support (post 3.1.1)
; Return Value(s):  Success - HTML included in the <HTML> of the docuement, including the <HTML> and </HTML> tags
;                   Failure - 0 and sets @ERROR to 1
; Author(s):        Dale Hohm
;
;===============================================================================
;
Func _IEDocReadHTML($o_object)
    If IsObj($o_object) Then
        SetError(0)
        Return $o_object.document.getElementsByTagName("HTML").item(0).outerHTML
    Else
        SetError(1)
        Return 0
    EndIf
EndFunc
Edited by Andrew Sparkes

---Sparkes.

Share this post


Link to post
Share on other sites

there is no ftp.


The cake is a lie.www.theguy0000.com is currentlyUP images.theguy0000.com is currentlyUP all other *.theguy0000.com sites are DOWN

Share this post


Link to post
Share on other sites

If it's a web server, check the google spider bot logs. They list files as long as they aren't excluded in robots.txt, but to do it in autoit.... I have no clue...

I'm not sure I know how to do this without anonymous ftp. Sorry I couldn't help more...

Sparkes.


---Sparkes.

Share this post


Link to post
Share on other sites

How would I get all the files in a web dirctory? (in this case, the directory is http://192.168.0.25/AutoNet/share)

Most web servers are set up to not allow directory browsing unless it is a file repository, so unless they have a file index, you are probably not going to do it without FTP access., You can walk the links the same way a search engine spyder does, but you may not get all files, only the ones that are linked.

This is a web site security issue. I don't know why anyone would allow anonymous directory level access.

Share this post


Link to post
Share on other sites

How would I get all the files in a web dirctory? (in this case, the directory is http://192.168.0.25/AutoNet/share)

Not too sure what terminology you are using to describe what you want.

By definition, anything on 192.168.0.25 is on a local LAN. Unless you are running FTP (which from your other post you say you are not), the files are not on a web directory, but can be shared across the LAN. If this is what you want, why not enable sharing and share them, and from the other end just map to them?

The commands in AutoIT to look at that mapped directory folder are in the help file: Look up FileFindFirstFile in the help file and take it from there.

Did I misunderstand something?

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0