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..??
Page 1 of 1
Script To Detect All Available Drives On PC..?
#3
Posted 05 November 2008 - 06:24 AM
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..??
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..??
Quote
$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
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
#4
Posted 05 November 2008 - 10:41 AM
cypher175, on Nov 4 2008, 09:24 PM, said:
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..??
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
[ autoIt ] ( Popup )
$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
Page 1 of 1

Sign In
Register
Help

MultiQuote