cypher175 Posted November 5, 2008 Posted November 5, 2008 Anybody know how I would go about coding a script to detect all the available drives on a PC: Fixed, Removable, USB, CD-DVD Ect.. And for each drive found I want to copy a file over to it.. Anyone know what Commands or Functions I would need to use for something like this..??
spudw2k Posted November 5, 2008 Posted November 5, 2008 (edited) Anyone know what Commands or Functions I would need to use for something like this..??Search the helpfile for DriveGetDrives() Edited November 5, 2008 by spudw2k Spoiler Things I've Made: Always On Top Tool ◊ AU History ◊ Deck of Cards ◊ HideIt ◊ ICU ◊ Icon Freezer ◊ Ipod Ejector ◊ Junos Configuration Explorer ◊ Link Downloader ◊ MD5 Folder Enumerator ◊ PassGen ◊ Ping Tool ◊ Quick NIC ◊ Read OCR ◊ RemoteIT ◊ SchTasksGui ◊ SpyCam ◊ System Scan Report Tool ◊ System UpTime ◊ Transparency Machine ◊ VMWare ESX Builder Misc Code Snippets: ADODB Example ◊ CheckHover ◊ Detect SafeMode ◊ DynEnumArray ◊ GetNetStatData ◊ HashArray ◊ IsBetweenDates ◊ Local Admins ◊ Make Choice ◊ Recursive File List ◊ Remove Sizebox Style ◊ Retrieve PNPDeviceID ◊ Retrieve SysListView32 Contents ◊ Set IE Homepage ◊ Tickle Expired Password ◊ Transpose Array Projects: Drive Space Usage GUI ◊ LEDkIT ◊ Plasma_kIt ◊ Scan Engine Builder ◊ SpeeDBurner ◊ SubnetCalc Cool Stuff: AutoItObject UDF ◊ Extract Icon From Proc ◊ GuiCtrlFontRotate ◊ Hex Edit Funcs ◊ Run binary ◊ Service_UDF
cypher175 Posted November 5, 2008 Author Posted November 5, 2008 ok thanks... so far i got this, but its not working though, whats wrong with it..?? I think its the "Drive" Variable, what am i suppose to use instead, so it copies "C:\0\1.txt" to all found drives..?? $var = DriveGetDrive( "all" ) If NOT @error Then MsgBox(4096,"", "Found " & $var[0] & " drives") For $i = 1 to $var[0] FileCopy("C:\0\1.txt", "Drive", 1 ) Next EndIf
UltraFine Posted November 5, 2008 Posted November 5, 2008 ok thanks... so far i got this, but its not working though, whats wrong with it..?? I think its the "Drive" Variable, what am i suppose to use instead, so it copies "C:\0\1.txt" to all found drives..?? try this $DISK = DriveGetDrive("ALL") For $I = 1 To $DISK[0] $STATUS = DriveStatus($DISK[$I]) If $STATUS = "ready" Then FileCopy("C:\New\File.txt", $DISK[$I] & "\File.txt") EndIf Next
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now