Jump to content

Command line Tool want using with Autoit


Recommended Posts

Hello

i got one command line tool that extract Websites FROM any file

but it extract websites to Only one file at time and save them in text file

like this

c:\>extractor.exe -files webistes.html > output.txt

i want to know is it possible to using this tool with autoit it search all drives and multiple file like text, doc , html , htm

help me if u have idea

thanksssss

Edited by asimzameer
Link to comment
Share on other sites

I am not sure what exactly you are wanting.

c:\>extractor.exe -files webistes.html > output.txt

You can have autoit run commandline tools easy:

$output="output.txt"
$webistes="webistes.html"
run('c:\>extractor.exe -files ' & $webistes & ' > ' & $output)

Now you can have it do multiple as well.

; Shows the filenames of all files in the current directory
$webistes = FileFindFirstFile("*.html"); what to look for

$count=0
; Check if the search was successful
If $webistes = -1 Then
    MsgBox(0, "Error", "No files/directories matched the search pattern")
    Exit
EndIf

While 1
    $file = FileFindNextFile($webistes) 
    If @error Then ExitLoop
$count=$count + 1
    runwait('c:\>extractor.exe -files ' & $file & ' > ' & "output" & $count & ".txt")
    MsgBox(4096, "File:" & $file, "saved as:" & "output" & $count & ".txt")
WEnd

; Close the search handle
FileClose($webistes)

I prefer using websites, but you might speak a different language. This is off the top of my head and not tested. You can also put in directory searches with a bit more work.

Edited by scriptkitty

AutoIt3, the MACGYVER Pocket Knife for computers.

Link to comment
Share on other sites

Hello

i got one command line tool that extract Websites FROM any file

but it extract websites to Only one file at time and save them in text file

like this

i want to know is it possible to using this tool with autoit it search all drives and multiple file like text, doc , html , htm

help me if u have idea

thanksssss

<{POST_SNAPBACK}>

How about like this:

del output.txt
for /f "tokens=*" %%A in ('dir *.html *.txt *.doc /s /b') do extractor.exe -files "%%A" >> output.txt
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...