Jump to content
Sign in to follow this  
arunachandu

How to extract the file in the folder

Recommended Posts

arunachandu

HI,

I want to extract the file that is present in the folder. Following is the code i have written.But when i execute it is throwing an error.

$Result_file_folder="D:\Documents and Settings\Arunac\My Documents\Results"

$search = FileFindFirstFile( $Result_file_folder & "*.html")

if $search=-1 Then

MsgBox(0,"Error", "Result file not found in the folder")

Exit

EndIf

while 1

$result_file = FileFindNextFile( $search)

if @error then ExitLoop

$result_page=$Result_file_folder & $result_file

MsgBox(4096,"Result page url:",$result_page)

WEnd

fileclose($search)

Can someone help me where i went wrong?

Thanks

Share this post


Link to post
Share on other sites
Arterie

I think u are missing a \ at

D:\Documents and Settings\Arunac\My Documents\Results\ <-

Share this post


Link to post
Share on other sites
arunachandu

Hey thanks. That was the silly mistake.

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  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.