Jump to content
Sign in to follow this  
AllSystemGo

USB STick scanning

Recommended Posts

AllSystemGo

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

Share this post


Link to post
Share on other sites
torels

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

Share this post


Link to post
Share on other sites
AllSystemGo

Great idea. Didn't think about that!!

Thxs.

Share this post


Link to post
Share on other sites
torels

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

Share this post


Link to post
Share on other sites
torels

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

Share this post


Link to post
Share on other sites
AllSystemGo

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

Thank you again!

Share this post


Link to post
Share on other sites
torels

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

Share this post


Link to post
Share on other sites

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
Sign in to follow this  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.