Quantcast
Channel: AutoIt v3 - General Help and Support
Viewing all articles
Browse latest Browse all 12506

FileCopy Problem

$
0
0
I want to distribute software to PCs on CDs. I thought this would work but it doesn't.

Will someone help?

Func LocateDrive($sPath)
Local $aDrive = DriveGetDrive("CDROM")
For $iLetter = 1 To $aDrive[0] Step 1
if FileExists($aDrive[$iLetter] & "\" & $sPath) then return $aDrive[$iLetter]
Next
Return -1
EndFunc

$DriveLetter = LocateDrive("MySetup\Setup.exe")

ConsoleWrite($DriveLetter & @CRLF)

DirCreate("c:\web\software")
DirCreate("c:\web\in progress")
DirCreate("c:\web\hold")
FileCopy("$DriveLetter:\website\software\*.*", "c:\web\software",1)
FileCopy("$DriveLetter:\website\*.*", "c:\web\hold",1)
FileCopy("$DriveLetter:\website\*.*", "c:\web\in progress",1)

Viewing all articles
Browse latest Browse all 12506

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>