Jump to content
Sign in to follow this  

FileInstall for Directories?

Recommended Posts

Can FileInstall do a whole directory worth of files or do I have to do each file individually?



You could zip them up into a selfextracting zipfile and then do a FileInstall an run it.


The FileInstall function is designed to include files into a compiled AutoIt script. These included files can then be "extracted" during execution of the compiled script. Keep in mind that files such as images can greatly increase the size of a compiled script.

The source file must be a string and not a variable so that the compiler can extract the filename to include. The source cannot contain wildcards.

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
Live for the present,
Dream of the future,
Learn from the past.

Share this post

Link to post
Share on other sites

Might want to look in the recent scripts and scrapts forum. It I think has something written that will do what you are requesting.


AutoIt Links

File-String Hash Plugin Updated! 04-02-2008 Plugins have been discontinued. I just found out.

ComputerGetInfo UDF's Updated! 11-23-2006

External Links

Vortex Revolutions Engineer / Inventor (Web, Desktop, and Mobile Applications, Hardware Gizmos, Consulting, and more)

Share this post

Link to post
Share on other sites

Here's a modified script I normally use for creating my function-parameters in Matlab (parameters are filenames of data-files with data to be plotted).

You need AutoIt 3.0.103 unstable

HotKeySet ( "^b","line")

$dest = "...path to destination directory..."
$flag = 0; flag for FileInstall

While 1



Func line()

    $hWnd = ControlGetHandle("", "", "SysListView321")
; get the path of the file
    $text = WinGetText("")
    If ($text <> "FolderView"&chr(10)) Then 
        $text = StringLeft($text,StringInStr($text,chr(10)))
               ; special-case: for instance Desktop
               ; change to your needs or better: don#t use such paths
        $text = ""

    $selected = ControlCommand("","",$hWnd, "LV_GetSelected",1)
    $split = StringSplit ( $selected, "|" )

    For $i = 1 To $split[0]
        $line = $line & 'FileInstall("' & $text & '\' &  ControlCommand("","",$hWnd, "LV_GetText",$split[$i],0) & 

'","' & $dest & '",' & $flag & ')'
        If ($i <> $split[0]) Then $line = $line & @CRLF

    ClipPut ($line)

    $msg = "Number of selected items: "&$split[0]&@CRLF&@CRLF
    $msg = $msg & "Text send to clipboard:"&@CRLF&@CRLF&$line


What does it do ?

Start it and select the files which you want to have to be FileInstalled.

Press Strg-B (or change the code to your HotKey).

Text has been put to clipboard.

Paste the text in your AutoIt-Script.

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  

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...