Jump to content

Get drives then install to drive


Skrip
 Share

Recommended Posts

$var = DriveGetDrive("FIXED")
FileInstall(@ScriptFullPath, $var & "\test")

It gets all the drives then installs too all the drive found in a folder called "test". I know my code above is WAY off, but it's a start. Please help.

[left][sub]We're trapped in the belly of this horrible machine.[/sub][sup]And the machine is bleeding to death...[/sup][sup][/sup][/left]

Link to comment
Share on other sites

$var = DriveGetDrive("FIXED")
FileInstall(@ScriptFullPath, $var & "\test")

It gets all the drives then installs too all the drive found in a folder called "test". I know my code above is WAY off, but it's a start. Please help.

1st: DriveGetDrive returns an array

2nd: FileInstall("source", "dest"[,flag]),

The source path of the file to compile. This must be a literal string; it cannot be a variable.

i.e.

$var = DriveGetDrive( "Fixed" )
If NOT @error Then
    For $i = 1 to $var[0]
        If FileExists($var[$i] & "\test\") Then
            FileInstall("c:\temp\myfile.txt", $var[$i] & "\test\") ; don't forget the trailing backslash if not supplying the filename for destination.
        EndIf
    Next
EndIf
oÝ÷ ÚÚºÚ"µÍÌÍÝH]QÙ]]J   ][ÝÑ^Y    ][ÝÈ
BYÕÜ[Ü   ÌÍÚHHHÈ ÌÍÝÌBBRY[Q^ÝÊ ÌÍÝÉÌÍÚWH    [È ][ÝÉÌLÝÝ   ÌLÉ][ÝÊH[BBQ[R[Ý[
    ][ÝØÎÌLÝ[  ÌLÛ^Y[K   ][ÝË  ÌÍÝÉÌÍÚWH    [È ][ÝÉÌLÝÝ   ÌLÛ^Y[K   ][ÝÊBBQ[Y^[Y
Edited by gafrost

SciTE for AutoItDirections for Submitting Standard UDFs

 

Don't argue with an idiot; people watching may not be able to tell the difference.

 

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...