中国DOS联盟论坛

China DOS Union

-- Unite DOS · Advance DOS · Grow DOS --
Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
Guest | Log in | Register | Members | Search | China DOS Union
中国DOS联盟论坛
The time now is 2026-08-15 15:53
47,813 topics / 349,903 posts / today 1 new / 48,257 members
DOS疑难解答 & 问题讨论 (解答室) » (Solved) Looking for software to add files to IMG, ISO images under DOS
Printable Version  5,822 / 22
Floor1 hxj Posted 2005-08-20 19:15
中级用户 Posts 66 Credits 377
Looking for software that can add files to IMG, ISO images in command mode under the DOS environment, with the premise that you cannot enter the Windows interface and the batch processing cannot be interrupted. I wonder if any expert has seen similar software?

[ Last edited by hxj on 2005-9-11 at 02:47 ]
Floor2 Wengier Posted 2005-08-21 07:27
系统支持 Posts 10,521 Credits 27,736
For IMG, there is! For example, IMG 2.0 can do it, such as:
IMG A DOS.IMG FILE.DAT
Floor3 hxj Posted 2005-08-21 08:35
中级用户 Posts 66 Credits 377
Originally posted by Wengier at 2005-8-21 07:27 AM:
For IMG, there is! For example, IMG 2.0 can do it, for example:
IMG A DOS.IMG FILE.DAT


Thanks a lot for the boss's help. I tried adding files to IMG and it works completely.
I've had this software for a long time, but I didn't know how to use it. Using IMG/? didn't show any information. I still had to ask you experts to solve the problem. Thanks again!

For adding files to ISO, I checked domestic and foreign websites, all are Windows interface software. But if there are Windows interface software with commands, which can be called in DOS batch processing, I haven't found it yet. Among WinISO, UltraISO, Daemon, ISOBuster, ISOMaker, Nero.... Which one has the command input usage?
Floor4 hxj Posted 2005-08-21 10:13
中级用户 Posts 66 Credits 377
Boss Wengier:

I finally found a software that can add files to an ISO using commands under (Windows) DOS. Here is the transcription of Magic ISO:


Magic ISO

http://www.magiciso.com/tutorials/miso-iso-creator.htm

Using MagicISO as ISO Creator

You are here: Tutorials > Using MagicISO as ISO Creator


--------------------------------------------------------------------------------

MagicISO not only creates ISO image files on the Windows GUI, but it can also create ISO image files on the Windows command line. You can find miso.exe, which is the MagicISO command line utility, in the MagicISO installation directory.

Commands of miso.exe
Commands Parameters Description
-f dir Set the working directory in the ImageFile, default: \ (Root)
-a file/folder Add files and folders into the ISO image file
-x dir Extract files and folders with subfolders from the ISO image file to the directory
-c foldername Create new folder
-d wildcard Delete the files/folders within the ISO image file
-aj Create Joliet Volume
-rj Remove Joliet Volume
-au Create UDF Volume
-ru Remove UDF Volume
-ar Create Rock Ridge Volume
-rr Remove Rock Ridge Volume
-ab BootFile Make bootable ISO file
-rb Remove bootable information from the ISO file
-l1 ISO Level 1 (DOS: Max. of 11 = 8+3 chars)
-l2 ISO Level 2 (Windows/Unix: Max. of 31 chars)
-l3 ISO 9660:1999 v2 (Max. of 207)
-py yes for all queries.
-pn no for all queries.


Samples of ISO Creator


miso.exe tools.iso -c tools -c "back up\magiciso" -l "TOOLS CD"

1. If tools.iso doesn't exist, then create tools.iso.
2. Create the "tools" folder in the root directory of the ISO image file.
3. If the "back up" folder doesn't exist, then first create the "back up" folder in the root directory of the ISO image file. After that, miso creates the "magiciso" folder in the "back up" folder.
4. Set the volume label of the ISO image file to "TOOLS CD".


miso tools.iso -f tools -a *.exe -a "c:\compiler tools"

1. If tools.iso doesn't exist, then create tools.iso.
2. Set the "\tools" folder as the current working folder.
3. Add "*.exe" files into the "\tools" folder
4. Add the "c:\compile tools" folder into the "\tools" folder.


miso tools.iso -f tools -x c:\tools *.exe

1. If tools.iso doesn't exist, then create tools.iso.
2. Set the "\tools" folder as the current working folder.
3. Extract "\tools\*.exe" (includes *.exe files in subfolders) to c:\tools.


miso tools.iso -d *.exe

1. If tools.iso doesn't exist, then create tools.iso.
2. Delete all "*.exe" files in the root directory of tools.iso


miso tools.iso -d *

1. Empty tools.iso


miso tools.iso -l3 -ab "c:\98_inst\bootxp.bif"

1. If tools.iso doesn't exist, then create tools.iso.
2. Enable ISO Level 3 format
3. Add the "bootxp.bif" bootable image file into the ISO image file.

If anyone finds a better one, even one that can be used in pure DOS, please let me know.

Thank you again, Brother Wengier, for your help!
Floor5 hxj Posted 2005-08-21 11:07
中级用户 Posts 66 Credits 377
Here is the translation:

A preliminary report on the trial situation is given to everyone.

1. After the software is installed, there is a MISO.EXE file in the installation directory, which is a command-line executable file.

2. Copy MISO.EXE to another directory containing an XXX.ISO file, and execute in the CMD window:

miso XXX.ISO -f Director -a xxx.img -py

Then the XXX.IMG file is added to the Director directory in XXX.ISO. (The original ISO has the XXX.IMG file - py is to avoid being prompted whether to replace or not)

3. Test again after uninstalling the MagicISO software, and the function of miso.exe can still be used correctly.

4. It cannot be used in pure DOS, and can only be used in Windows.

5. The software is a trial version. Without registration, it can only be used for ISO files below 300M. For my purpose of use, it is sufficient. Of course, it would be better to find a registration code.
Floor6 hxj Posted 2005-08-21 22:17
中级用户 Posts 66 Credits 377
Elder Wengier:

I thought the problem was solved, but now I find that the img.exe I used didn't really replace the original files in IMG. Is it because the version of the software I used is incorrect or the software is wrong? This file is 13k, downloaded from PCHOME (IMG1.EXE for 1995 and 2001). There is also an image for DOS abroad, which is also called img.exe in China. It seems that you need to press Ctrl+Alt+S+A+Z to open it, and it doesn't have the command usage you mentioned.

Elder, can you please give me the download address of the img.exe 2.0 software you mentioned? Thank you very much!

[ Last edited by hxj on 2005-8-21 at 22:22 ]
Floor7 willsort Posted 2005-08-25 20:47
元老会员 Posts 1,512 Credits 4,432
Re hxj:

Found IMG 2.0E for DOS here by chance:

http://input.cpatch.org/arc/

If you can't download it, I'll consider uploading it.
Floor8 hxj Posted 2005-08-25 22:27
中级用户 Posts 66 Credits 377
Originally posted by willsort at 2005-8-25 08:47 PM:
Re hxj:

I finally found IMG 2.0E for DOS from here:

http://input.cpatch.org/arc/

If you can't download it, I will consider uploading it.


Thanks to the moderator's enthusiastic help, I have downloaded IMG 2.0 and successfully added the xxx.txt file to the win98.img file using the command (img a win98.img xxx.txt) under DOS.
It's a pity that this software only supports adding files to standard 1.44M (haven't tried 2.88 yet) IMG files, and cannot support non-standard IMG files. And my final goal is to add files to the non-standard size IMG made by EASYBOOT. It seems I have to think of other ways. Teacher gmy recommended using the Winimage SDK software, but it's too difficult for me, a newbie. Are there any other good methods?
But still, thank you for the moderator's help. I hope the China DOS Union can become a paradise for netizens to solve DOS difficult problems!
Floor9 Climbing Posted 2005-08-25 22:32
铂金会员 Posts 2,753 Credits 6,962 From 河北保定
The SDK of Winimage is indeed a good approach, but it requires programming by oneself. I hope there are programming experts willing to do such work.
Floor10 willsort Posted 2005-08-25 23:07
元老会员 Posts 1,512 Credits 4,432
Re hxj:

Perhaps I didn't understand it correctly, but I think the -s switch should allow img to support more image sizes. The key is that when adding files to an image, img requires that there is enough free space in the image, and it seems it can't automatically expand the image's space. In that case, it seems you can first extract to a file, then add it as a new image, and at this time you can use multiple sizes, but the non-file information in the original image may not be retained.
Floor11 hxj Posted 2005-08-26 09:19
中级用户 Posts 66 Credits 377
Originally posted by willsort at 2005-8-25 11:07 PM:
Re hxj:

Maybe I didn't understand it clearly, but I think the -s switch should enable img to support more image sizes. The key is that when adding files to the image, img requires that there must be enough...



I tried again: Files can be added to a 2.88M IMG, but it doesn't work with other non-standard size IMGs. It seems this software only supports adding files to floppy disk image IMGs. -S is used to specify the size of the IMG file when it doesn't exist, and the maximum can only generate 1764K.

Thank you again for the moderator's attention!

If someone can develop a software that can extract and add files to non-standard format IMGs using the Winimage SDK as Climbing said, it should be very useful: for example, automatically updating files in CD ISO files' IMGs. I was trying to achieve this purpose, but unfortunately, due to limited level, I was blocked by the inability to add files to IMGs.

[ Last edited by hxj on 2005-8-26 at 09:20 ]
Floor12 willsort Posted 2005-08-26 09:41
元老会员 Posts 1,512 Credits 4,432
Re hxj:

I also actually tested it, and the process is roughly as follows:

Create a new 720K size image (because it's a size supported by both WinImage and IMG) using WinImage, add several small files, which are less than 100K, save it as new.ima in uncompressed IMA format, then execute img a new.ima *.txt in the XP command line. The result is that all text files in the current directory are added to new.ima, about 40K.

After that, I also created a standard 320K and a non-standard 820K size IMAGE, and the same steps still executed normally. Therefore, whether img can add files does not depend on whether the image size is standard, but on whether there is enough available space in the image.

The above tests and opinions may be too one-sided. Please refer to them as appropriate, Brother hxj.
Floor13 hxj Posted 2005-08-26 16:42
中级用户 Posts 66 Credits 377
Originally posted by willsort at 2005-8-26 09:41 AM:
Re hxj:

I also actually tested the process roughly as follows:

Create a new 720K size image (because it is a size supported by WinImage and IMG) with WinImage, add several small files...


Moderator: Hello!

First of all, I should thank the moderator for also personally testing the software.

Based on the moderator's test of the situation where this software adds files to IMg, what I said that the floppy disk IMG file must be in a standard format is indeed incorrect.

I carefully read the instructions again. Within the range of a 1.44M floppy disk, non-standard IMG of different sizes can be generated, but it must be a floppy disk image file and the size cannot exceed 1764K (the 2.88M one is actually okay).

Possible sizes of disk image files
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

When creating a new disk image file, a size can be specified with the switch '-s'. The following table shows the possible combinations of the number of tracks and sectors per track (while the number of sides is 2). The given sizes are in KB.

The first row contains the sectors per track and the first column the number
of tracks:

| 9 | 10 | 15 | 17 | 18 | 20 | 21
-------+--------+--------+--------+--------+--------+--------+--------
80 | 720 | 800 | 1200 | 1360 | 1440 | 1600 | 1680
81 | 729 | 810 | 1215 | 1377 | 1458 | 1620 | 1701
82 | 738 | 820 | 1230 | 1394 | 1476 | 1640 | 1722
83 | 747 | 830 | 1245 | 1411 | 1494 | 1660 | 1743
84 | 756 | 840 | 1260 | 1428 | 1512 | *) | 1764

*) The combination of 84 tracks and 20 sectors per track leads to the same
size as 80 tracks and 21 sectors per track.

The size 720 matches with a DD 3 1/2" floppy disk.
The size 1200 matches with a HD 5 1/4" floppy disk.
The size 1440 matches with a HD 3 1/2" floppy disk.


When I tested the IMG generated by EASYBOOT with several M sizes, even after deleting all the files inside, I couldn't add files. It prompted invalid disk image, and the software didn't recognize this format of IMG. The 4.57M file generated by Winimage was also not recognized. But a ready-made bootable 2.88M IMG could add files.
It seems that the IMG file must be a floppy disk image, and other image files may not be well supported.
Floor14 willsort Posted 2005-09-02 16:43
元老会员 Posts 1,512 Credits 4,432
Re hxj:

Did another round of testing today. Since I'm new to WinImage and not familiar with many situations, I created nearly a hundred test files and got the following results.

For the standard and non-standard format image files created with WinImage, as long as they are saved as uncompressed.IMA files and there is enough free space, they can all be added to the file using IMG normally.

For the custom format image files created with WinImage, the image size can only be controlled by adjusting the total number of sectors. When the total number of sectors is greater than 8,387,776 (0x7ffcc0), the "OK" button becomes grayed out and ineffective, and the image size at this time is 4,193,88B; when the total number of sectors is greater than 4,19x, xxx (the number is not fixed), an image can be generated, but files cannot be added using WinImage itself; while if it is less than this number, files can be added, the.IMZ compressed image filter is gone in the save dialog, and after saving, adding files with IMG shows that it is not recognized.

As for "the IMG file must be a floppy disk image", I've never heard of a non-floppy disk image.IMG before.

As for the image formats supported by IMG.EXE, it's clearly stated in the readme:

    raw disk image - direct read/write image of a floppy disk, no file header, no data compression;
    other forms of raw disk images - direct read/write image with a file header containing no more than 10,000 bytes, no data compression;
    HD-copy image - image made with HD-Copy, with data compression;
    VGA-Copy image - image made with compression software ARJ, with data compression;

And the.IMZ format created by WinImage belongs to the compressed format not supported by IMG, because IMG appeared earlier than WinImage.
Floor15 hxj Posted 2005-09-03 15:34
中级用户 Posts 66 Credits 377
Moderator willsort

I didn't expect the moderator to be so enthusiastic and have such a spirit of research, which is admirable!

I think maybe I didn't make the problem clear enough: I used EasyBoot to make a bootable IMG file of several megabytes or even more than ten megabytes, and I want to use batch processing commands in DOS to add files to the IMG (the purpose is to update some files in it). WinImage can be implemented under Windows, but it has no command-line usage. My requirement is to find a command that can be used in DOS (CMD) to add (replace) files to this custom large-capacity IMG.

IMG.EXE 2.0 can add files to standard (including some non-standard size) floppy disk image IMG files under DOS. As the moderator tested, Winimge can add files to IMG made by Winimage which is larger than 2.88M or even hundreds of M (I tested 245M and it can still be added, which seems to exceed the upper limit of the moderator's test), but IMG.EXE 2.0 cannot. I tried IMG.EXE and it doesn't recognize IMG larger than 2.88M. I didn't see whether the moderator used IMG.EXE to realize adding files to large-capacity IMG above 2.88M in the test.

I don't quite understand the definition of IMG files, so I thought only IMG below 2.88M is a floppy disk image IMG. IMG made by EayBoot like me with large capacity can't be regarded as a floppy disk image, but can be generally called a disk image IMG, just like hard disk and CD-ROM images also have IMG suffix. The view may not be correct, please ask the moderator for guidance!

Once again, I would like to thank the moderator for his enthusiastic help. I hope to come up with a good idea to solve this problem for me! I searched the Internet and didn't find the software I need, but the MISO.EXE I found is exactly what I need. It's very easy to use and worth recommending!
1 2  Next
[ Contact the Union admin team - 中国DOS联盟 - Standard version ]
Sponsored by ifanr Inc | © 2001–2023