AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CD change detection for bulk cd -> hd copying

 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help
View previous topic :: View next topic  
Author Message
quicktest



Joined: 30 Jul 2004
Posts: 42

PostPosted: Sun Oct 14, 2007 2:38 pm    Post subject: CD change detection for bulk cd -> hd copying Reply with quote

Hi all,

I believe this was discussed before, although I spent an hour searching through the forum to no avail, so am risking my membership to see if anyone could give me some pointers on how to accomlish it, or where to find the threads.

The project is to bulk copy backup cd/dvds to hd, for easier access. Problem is I need to switch cds and initiate copy constantly. I thought of a script that would:

1. detect if a cd is in drive
2. check cd filelist to see if it is the same as previous
3. copy all files on cd to hd
4. eject after completion

The problems I'm having with this design are:

1. I don't know how to detect or get notified if a new cd is in the drive, on the hardware level. I recall there was a thread about a DLL call for this exact function, however I could not locate it now.
2. The filelists could grow huge and the comparison may take a long time. Is there a better way? Would volume label checking be sufficient?
3. I may have non-english files on the cd. I'm wondering if AHK's FileCopy could accomodate these files? (I'm sure the foreign files are copiable by Windows's Copy&Paste.) If not, is there a utility that could perform this copy function and then exit?

Please let this newbie know of any recommendations/pointers or better designs you may have. Thanks in advance.
Back to top
View user's profile Send private message
engunneer



Joined: 30 Aug 2005
Posts: 6856
Location: Pacific Northwest, US

PostPosted: Sun Oct 14, 2007 4:21 pm    Post subject: Reply with quote

3. Since you are likely using a loop to copy them (or just having ahk run the xcopy command?), there will be no problem.

2. I would not worry, if you just make a script smart enough to detect a cd, you can then have it auto-eject when done, and then when a file is available there must be a new cd, unless you forget to change it.

1. try
USB device connected/disconnected notification?
Eject any drive by Thalon
(links borrowed from a post by Skan)
_________________
Unless otherwise noted, all code is untested.
Common Answers: 1.(Loops, Viruses, etc.) 2. Search 3.RTFM
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group