Jump to content

Recommended Posts

Posted

Hi guys,

I'm trying to create a new script that scans all the USB port to find my USB stick. Is there a way to do that??

What I would like to do ultimately is to be able to scan all USB ports and once it find the USB stick then go and get my config file on it! Is there a way to accomplish that??

Thank you

Cheers

Posted

Try putting a file with an odd name in your stick (ex. "Stick_identifier") with nothing inside it

then get the drive list and for each drive verify if "Stick_identifier" exists

if yes... it's your stick

then just FileCopy(path,newpath)

:)

Some Projects:[list][*]ZIP UDF using no external files[*]iPod Music Transfer [*]iTunes UDF - fully integrate iTunes with au3[*]iTunes info (taskbar player hover)[*]Instant Run - run scripts without saving them before :)[*]Get Tube - YouTube Downloader[*]Lyric Finder 2 - Find Lyrics to any of your song[*]DeskBox - A Desktop Extension Tool[/list]indifference will ruin the world, but in the end... WHO CARES :P---------------http://torels.altervista.org

Posted (edited)

so for example:

$dirves = DriveGetDrive("ALL")

for $i = 0 to UBound($drives) - 1 ;loop
 if FileExists($drives[$i] & "\Stick_identifier") then 
  $exists= 1
  $drive = $dirves[$i]
  exitloop
 else
  $exists = 0
 EndIf
next

If $exists = 1 then Copy("settings_path",$drive & "\settings_file")
Edited by torels

Some Projects:[list][*]ZIP UDF using no external files[*]iPod Music Transfer [*]iTunes UDF - fully integrate iTunes with au3[*]iTunes info (taskbar player hover)[*]Instant Run - run scripts without saving them before :)[*]Get Tube - YouTube Downloader[*]Lyric Finder 2 - Find Lyrics to any of your song[*]DeskBox - A Desktop Extension Tool[/list]indifference will ruin the world, but in the end... WHO CARES :P---------------http://torels.altervista.org

Posted

is it working ?

Some Projects:[list][*]ZIP UDF using no external files[*]iPod Music Transfer [*]iTunes UDF - fully integrate iTunes with au3[*]iTunes info (taskbar player hover)[*]Instant Run - run scripts without saving them before :)[*]Get Tube - YouTube Downloader[*]Lyric Finder 2 - Find Lyrics to any of your song[*]DeskBox - A Desktop Extension Tool[/list]indifference will ruin the world, but in the end... WHO CARES :P---------------http://torels.altervista.org

Posted

Sure it is Torels. Thank you very much!!! You got a great and simple idea! I should of thought about it!

Thank you again!

:)

Some Projects:[list][*]ZIP UDF using no external files[*]iPod Music Transfer [*]iTunes UDF - fully integrate iTunes with au3[*]iTunes info (taskbar player hover)[*]Instant Run - run scripts without saving them before :)[*]Get Tube - YouTube Downloader[*]Lyric Finder 2 - Find Lyrics to any of your song[*]DeskBox - A Desktop Extension Tool[/list]indifference will ruin the world, but in the end... WHO CARES :P---------------http://torels.altervista.org

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
×
×
  • Create New...