Jump to content

File management in batch file


Raptor88
 Share

Recommended Posts

Working on my copy disc batch file control program. My problem is how to determine which file to burn. Let me explain.

 

If I use a specific destination path in my read command to ImgBurn like this:

"C:\Program Files\ImgBurn\ImgBurn" /mode read /src %InputDrive%: /dest "C:\IBurnTmp\ImgBurnTemp.iso" /overwrite yes /eject %EjectDisc% /close /start

 

It works fine if I'm trying to copy a DVD. But if I try to copy an audio CD, ImgBurn pops up a message saying that I made a booboo and it will write to a .bin file. It does that OK but the user has to answer the pop up message before the read process can continue. I don't want that.

 

So I delete the destination in my read command as follows:

"C:\Program Files\ImgBurn\ImgBurn" /mode read /src %InputDrive%: /overwrite yes /eject %EjectDisc% /close /start

 

Now ImgBurn writes the proper files to the HDD. But it writes it to E:\DiscLabel.bin. Why it writes the file to the root directory of E: I have no clue since in TOOLS > SETTINGS > FILE LOCATIONS, every entry is using the C: drive. Why is it writing the file to the E: root directory?

 

I'm afraid that other users on different computers will have the file written to different hard drives so how can I find the proper file to burn it automatically?

 

WHAT I'VE TRIED:

After searching this forum, I found a post where Lightning suggested to check the "Add to write queue when done". So I checked that in ImgBurn but when I try to do the read and write operation manually (not from a batch file), ImgBurn still doesn't know where the file for the last read operation is stored. How do other users using ImgBurn manually (not from a batch file) know where the file was written to the HDD so they can select it during the burn operation?

 

Any suggestions on how I can write my batch file so it will write the file from a data cd, audio cd, data dvd or movie dvd on the HDD and then let my batch file find the files and burn them on the disc all automatically without any user intervention?

 

Thanks,

Raptor

Link to comment
Share on other sites

Read mode has its own setting for the destination path.

 

When set to 'automatic' it'll use the drive with the most free space - assuming the user has permission to write to it. If they don't then it'll go in their documents folder.

Hi Ligntning, thanks for your reply.

 

I went to TOOLS > SETTINGS > READ, clicked CUSTOM and set the path to C:\IBurnTmp. Now my batch file read command saves the files to that folder. Great!

 

Now, is there a setting in ImgBurn to make it burn the last disc it read regardless of the name of the disc?

IOW, remember the path to the last file(s) (.bin, .cue) it wrote on the HDD during the last read operation?

 

Thanks,

Raptor

Edited by Raptor88
Link to comment
Share on other sites

Now, is there a setting in ImgBurn to make it burn the last disc it read regardless of the name of the disc?

 

Nope.

 

I guess the only way around this issue is for me to add a new cli switch to just accept that it can't be named *.iso and then for you to check if the *.iso exists after a read operation, if it doesn't then use *.bin.

 

Of course if you load the iso/bin when an mds/cue should have been loaded it'll moan again :D (Need a cli switch for that too I guess)

Link to comment
Share on other sites

Now, is there a setting in ImgBurn to make it burn the last disc it read regardless of the name of the disc?

 

Nope.

 

I guess the only way around this issue is for me to add a new cli switch to just accept that it can't be named *.iso and then for you to check if the *.iso exists after a read operation, if it doesn't then use *.bin.

 

Of course if you load the iso/bin when an mds/cue should have been loaded it'll moan again :D (Need a cli switch for that too I guess)

In that case I guess the only way around it for now is for my batch file to ask the user what kind of disc he/she is trying to copy.

I have a question on the kind of files generated for different types of discs which would be more helpful to others by starting another thread with the proper subject header. I'll start that thread now after I transmit this post.

 

Thanks a lot for your time!

Raptor

Link to comment
Share on other sites

 Share

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.