troubleshooting Question

Batch file to automate nrg2iso conversion

Avatar of asgarcymed
asgarcymedFlag for Portugal asked on
SoftwareMiscellaneousWindows Batch
5 Comments1 Solution414 ViewsLast Modified:
Inside a main folder I have many subfolders (which may have sub-subfolders), and which have different types of files (extensions - *.ext).
I need to recursively get all *.nrg files, and then, for each one, call nrg2iso.exe (a command-line tool which converts nrg to iso - CD/DVD image files).

nrg2iso.exe has the following syntax:
nrg2iso.exe image.nrg image.iso

I tried to create a batch file (.bat):

FOR /R "C:\test" %%I IN (.) DO IF EXIST %%I\*.nrg nrg2iso *.nrg "%%I"\*.iso

But I got an error message - «*.nrg - No such file».

I made other similar batch files (.bat), for other purposes, and they worked fine. For example:

For /R ""C:\test" %%I IN (.) DO If Exist %%I\*.iso "C:\Program Files\WinRAR\WinRAR.exe" x "%%I"\*.iso "%%I

This extracts iso files using WinRAR.

Can you please help me to make a working batch script to convert nrg to iso (using nrg2iso)?

Thanks in advance.
Best regards.
Join our community to see this answer!
Unlock 1 Answer and 5 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 5 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros