Indigo Rose Software

Professional Software Development Tools

 
Page 1 of 3 1 2 3 LastLast
Results 1 to 15 of 37
  1. #1
    Join Date
    Mar 2004
    Posts
    18

    Finding which drive contains a CD from "CD Volume Label"

    Hi,

    I'm trying to do a menu that will search the hardware devices located on your PC by looking for a specific CD Volume Label.

    I'm no programmer so using VB or similar isn't really an option for me.

    What I want to do is:
    ==============
    1. Look at all device letters from C: to Z: (I don't know what device letter someone may have the CD in)
    2. Find the device letter the CD is in by searching for a specific CD Volume Label
    3. Using the device letter from 2. above, then copy the contents of that CD to the hard-drive, say C:\CD1

    You see, some of us have a collection of archived articles on a 6 CD set and I'm trying to create a menu that will enable any of us with a DVD-R/RW, to copy the contents of each CD to hard-drive, then create a DVD.iso that can be easily burnt to a blank DVD, some are computer illiterate. (I can create a command-line to create the DVD.iso so that's no problem)

    Hope it's not too complicated. ops

    Cheerz

  2. #2
    Join Date
    Jul 2002
    Location
    USA
    Posts
    3,959
    Code:
     --Populate a table with A-Z
    tblDriveLetters = {};
    for n=65, 90 do
    	Table.Insert(tblDriveLetters, Table.Count(tblDriveLetters) + 1, String.Char(n))
    end
    
    --Check to see which drives are a CD
    strCD="";	
    for n, DriveLetter in tblDriveLetters do
    	if String.ToNumber(Drive.GetType(DriveLetter)) == 5 then
    		strCD= strCD .. DriveLetter .. "\r\n";
    	end
    end
    Dialog.Message("CD Drives", "The CD drives available on your system are as follows: \r\n" ..strCD, MB_OK)

  3. #3
    Join Date
    Mar 2004
    Posts
    18
    Originally posted by Worm
    Code:
     --Populate a table with A-Z
    tblDriveLetters = {};
    for n=65, 90 do
    	Table.Insert(tblDriveLetters, Table.Count(tblDriveLetters) + 1, String.Char(n))
    end
    
    --Check to see which drives are a CD
    strCD="";	
    for n, DriveLetter in tblDriveLetters do
    	if String.ToNumber(Drive.GetType(DriveLetter)) == 5 then
    		strCD= strCD .. DriveLetter .. "\r\n";
    	end
    end
    Dialog.Message("CD Drives", "The CD drives available on your system are as follows: \r\n" ..strCD, MB_OK)
    Hi worm,

    Thankz for replying, appreciated.

    It returns G, H, and L which is correct for my PC.

    But how can I search for the CD Volume Label string of say CD1, or CD2 etc. then pass this onto another command/function that will copy the contents of that CD to a specific directory on your hard-drive.

    e.g. if CD Volume Label = CD1, it copies CD contents to C:\CD1 etc.

    Cheerz

  4. #4
    Join Date
    Jul 2002
    Location
    USA
    Posts
    3,959
    Here's a sample app that uses a DLL I wrote to grab the Volume Label.

    Enjoy!
    Attached Files

  5. #5
    Join Date
    Jul 2002
    Location
    USA
    Posts
    3,959
    As for copying a folder.
    See this thread.

  6. #6
    Join Date
    Mar 2004
    Posts
    18
    Originally posted by Worm
    Here's a sample app that uses a DLL I wrote to grab the Volume Label.

    Enjoy!
    Hi Worm,

    I'm really sorry about this, just can't seem to get it working.

    I can find the device letter and the Volume Label, but don't know where to go from there, how to pass this information on.

    Like I said, I'm no programmer. ops ops

    Hope you have the patience to guide me through this me being a nuisance ops

    Cheerz

  7. #7
    Join Date
    Jul 2002
    Location
    USA
    Posts
    3,959
    Try this...
    Attached Files

  8. #8
    Join Date
    Mar 2004
    Posts
    18
    Hi Worm,

    I had inserted the CD with volume label CD1 before running.

    I ran your code and it returns this error comment:


    Copying files from CD1:CD1 failed.
    Any suggestion, I really appreciate you help, sorry I'm no help myself.

    Cheerz :(
    Attached Images

  9. #9
    Join Date
    Jul 2002
    Location
    USA
    Posts
    3,959


    Oops, had a little coding error in that last one.

    Try this one.
    Attached Files

  10. #10
    Join Date
    Mar 2004
    Posts
    18

    It's getting there :)

    Originally posted by Worm


    Oops, had a little coding error in that last one.

    Try this one.
    Hi Worm,

    I'm getting to really love worms, friggin awesome, you're a champ and a very patient one at that.

    Now taking it a little further, can you do this:

    1. Add a comment when you first press the button to Insert CD1, then press OK to start copying files to C:\
    2. During the copy process, Add a CANCEL button or "X" to stop process.
    3. Add a Loop that prompts you to Insert CD2, then press OK to start copying files to C:\, then after that CD has finished, prompts you to Insert CD3 etc.

    Also, thinking about it, is it possible to Add a prompt before 1. above where they fill-in the Drive letter to copy the files to J:\ incase their C:\ doesn't have sufficient space and this parameter is then carried on for the rest of the process so all 6 Cd's are copied.

    If they don't insert the correct sequence of CD's, they get prompted to insert the correct one.

    I know you're doing all the work, but I do look at what you are doing, then try to incorporate hopefully what I learn into new projects.

    Thankz again, much appreciated.

    Cheerz
    Attached Images
    Last edited by KennyC; 03-23-2004 at 02:51 PM.

  11. #11
    Join Date
    Jul 2002
    Location
    USA
    Posts
    3,959
    You try first, then post the code when you run into problems. I could write the whole thing for you, but you won't get much out of it.

    I'm more than willing to help you along the way, but I'd rather steer you in the right direction, than drive you to the destination.

  12. #12
    Join Date
    Mar 2004
    Posts
    18
    Check the next post, worked out how to save an .apz.

    Cheerz
    Last edited by KennyC; 03-24-2004 at 07:06 AM.

  13. #13
    Join Date
    Jul 2002
    Location
    USA
    Posts
    3,959
    To create a APZ, use File/Export.

    I'll take a look at this in a little while, and get back with you.

  14. #14
    Join Date
    Mar 2004
    Posts
    18
    Hi Worm,

    I'm not getting very far, sorry ops

    I've done a bit of coding in dBase5 and Excel sometime back, but I'm not really familar with this language, even though I've used the immediate IF (IIF) command in dBase5 many times.

    I'm not sure how to get it into a LOOP so CD1, then CD2 can be done.

    I wonder if it would simpler for me to do, and the others who may use it, if I used 6 buttons, one for each CD.

    If I go with the individual buttons, I may need a prompt if they insert the wrong CD, like the button is for CD2 and they insert CD3.

    I also notice that when testing, I get an error as autorun.exe didn't completely UNLOAD.

    Cheerz
    Attached Files

  15. #15
    Join Date
    Sep 2002
    Location
    Sol 3
    Posts
    3,160

    Thumbs up <-Golden Thumb

    Originally posted by KennyC

    I'm getting to really love worms, friggin awesome, you're a champ and a very patient one at that.

    TJ-Tigger
    "A common mistake that people make when trying to design something completely foolproof was to underestimate the ingenuity of complete fools."
    "Draco dormiens nunquam titillandus."
    Map of IR Forum Users - IR Project CodeViewer - Online Help - TiggTV - QuizEngine

Page 1 of 3 1 2 3 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts