Renaming Files In Dmg File
Review the DMG's contents. Most of the time, you'll use DMG files to install an app. However, some DMG files contain images or text files as well. Anything ending in.app is an installable app. You'll most likely see an 'Applications' icon in the DMG window. This is a shortcut to your Mac's Applications folder. The following may accomplish what you are looking for. It uses a for loop to iterate through the text files and makes a 'call' to another bit of the batch file to do the rename and increment of a variable. Edit Change math operation to cleaner solution suggested by Andriy.
- File Rename Utility Free
- How To Rename Multiple Files
- Program To Rename Files
- Rename A File Using A Batch File
- File Rename Tool Windows 10
how to work with
Disk Images
Mini vMac uses 'disk image' files, that hold the information of an emulated disk. For information about using disk images in Mini vMac, see the 'Floppy Drive' section of the Hardware Reference. This page is about transferring files from the host operating system into and out of disk image files. The exact methods available depend on the operating system.
General Notes
:
Macintosh
:
Windows
:
Linux
Update - The utilities ImportFl and ExportFl, which work in Mini vMac 3.0.0 and later, provide an alternative to the techniques described on this page for mounting disk images in the host operating, which has become increasingly difficult. (HFVExplorer for Windows is disappearing and HFS disk image support has become flaky at times in OS X.)
It is better to use a separate disk image for transferring files, since using a disk image with both Mini vMac and other software, which usually seem to have slightly different ideas of the disk image format, tends to eventually lead to corruption of the disk image. You should periodically delete your transfer disk image file and get a new one.
You can get a new blank disk image from the 'Blanks' archive.
Some versions of Mac OS for the Macintosh Plus, such as System 7.5.5, can mount DOS format images, which opens some more possibilities for transferring files on non-Macintosh host operating systems. However, this seems to be especially prone to corruption problems, so it is safest to use a new transfer disk image for each file transfer.
It is common for more recently created archives to not be usable by software that runs on a Macintosh Plus, even when the software in the archive works on a Macintosh Plus. In this case, you should first uncompress it on a modern Macintosh (or with Stuffit Expander for Windows version 7 as described below). On the other hand, old archives might not be understood by modern software, so you sometimes need to try both ways.
Update - Macintosh OS X 10.6.0 and later can no longer write to HFS disks or disk images. (It is still possible to mount them read only.) The main work around is to use ImportFl (along with tools to create an archive that preserves resource forks and other Macintosh specific information). Another possibility is to run a different emulator that can work both with HFS and HFS+ disk images (such as Basilisk II or Sheepshaver, according to David Sibley). And another possibility is Jesús A. Álvarez's FuseHFS. And there is HFS Disk Maker by Charles (author of Pacifist). Still another possibility is that if you have a file that is already on a 1.4M HFS floppy disk, and have a USB floppy drive, then Disk Utility can make an image of the floppy, and that image can be used with Mini vMac.
Renaming a disk image to end in '.dmg' (not '.dsk') makes it directly mountable in recent versions of Mac OS X.
The 'SetFType.dimg' version of 'SetFType' makes disk images directly mountable in Mac OS 9, and early versions of OS X.
Here are the steps to transfer a file into a new disk image:
File Rename Utility Free
Get a new 'blank' disk image, large enough to hold the file.
Rename the new disk image to end in '.dmg'.
In OS 9 or earlier (and some early version of OS X) drag it onto 'SetFType.dimg', to make it mountable. Click OK to the success notification. (When SetFType works, it may not be necessary to rename the image to end in '.dmg', but it doesn't hurt.)
Double click on the disk image to mount it. The icon should show up on the desktop (and in OS X, the top level computer folder), named 'untitled'.
Drag the file you want to transfer onto this mounted volume.
Eject this mounted volume, such as by dragging its icon to the trash. (It is very important to remember to do this in Mac OS X, because the operating system allows two programs to open the same file for writing, with no way for the programs to prevent it, a really bad design. Two different programs mounting a disk image file for writing will usually cause irreparable corruption.)
You can now mount the disk image file in Mini vMac, such as by dragging its icon into the Mini vMac window.
There are many reports that 'SetFType.dimg' fails to make an image mountable on Intel Macintoshes (and I've observed this myself). An alternative is to rename the disk image to end in '.dmg' (not '.dsk'). However, there is also one report of this failing also.
For OS 9 and earlier, mounting a disk image requires the application 'Disk Copy'. It is included with some versions of the OS, but if you don't have it installed you can download Disk Copy 6.3.3 from Apple.
The freeware program 'HFVExplorer' can view and modify Macintosh HFS disk image files. Its website and mirror have disappeared, but copies of HFVExplorer can still be found on the web.
Here are the steps to transfer a file into a new disk image:
Get a new 'blank' disk image, large enough to hold the file.
Launch HFVExplorer.
Navigate the panel on the left to find the folder containing the file to be transferred. Then select the file in the panel on the right. Choose 'Copy' from the Edit menu.
Choose 'Open volume' from the File menu. Select the new disk image file.
Choose 'Paste' from the Edit menu. Click 'OK' in the 'Select copy mode' dialog.
Quit HFVExplorer. (I don't know of any other way to make it close a disk image.)
You can now mount the disk image file in Mini vMac, such as by dragging its icon into the Mini vMac window.
HFVExplorer can decode MacBinary ('.bin') files. Just follow the steps above and it will be done automatically.
You should not use Stuffit Expander for Windows to expand an archive containing an application and then transfer the application using HFVExplorer. This will lose essential Macintosh specific information (such as the resource fork). You should instead use HFVExplorer to transfer the archive into a disk image, and then use Stuffit Expander running within Mini vMac to expand it.
But Stuffit Expander 4.0.1 can not handle some more modern archives. An alternative is that Stuffit Expander for Windows version 7 can correctly expand a Macintosh application and then re-encode it in MacBinary format. To enable this feature, choose the Options command in the View menu, select the 'Cross Platform' tab, and for 'Save Macintosh files in MacBinary format', choose either 'Always' or 'When a file contains a resource fork'. (This feature is also supposed to be in version 9 of Stuffit Expander, but it didn't work when I tried it.) With this feature enabled, even though Stuffit Expander doesn't rename the resulting files to end in '.bin' they are still in MacBinary format. HFVExplorer can decode them, or you can use binUnpk or Stuffit Expander from within Mini vMac.
You can mount a Macintosh HFS disk image file with commands such as:
However, this can only be done by the root user. Does any one know of a method that doesn't require root?
Update 12/10/2004 - Orion Sky Lawlor provides this tip:
'I figured out one good way to shovel one's data into minivmac. You can make a little HFS image file from a collection of separate files using the (standard unix) CD authoring tool 'mkisofs':
This creates a HFS volume in the file 'stuff.hfs', which can immediately be mounted in minivmac. Because mkisofs is so cool, this even works if your Mac files have been mangled to work on another platform using AppleDouble, BinHex, PC Exchange, netatalk, or MacOS X's external format.'
This worked for me when I tried it on Red Hat Linux 9. I noticed the man page warns against using -hfs-unlock (which prevents the disk image being set as locked), since 'it's not a 'real' HFS volume.' And indeed, Disk First Aid and Norton Utilities found problems with the created disk image.
Update 9/20/2013 - Hens Zimmerman writes that “mkisofs (on Linux) is obsolete. You can now use genisoimage instead, which creates a great hfs file that Mini vMac can read.” Wikipedia says that cdrkit (containing genisoimage) is a fork of cdrtools (containing mkisofs), due to licensing reasons.
Update 10/29/2015 - Another report on using genisoimage: “The image won't open with System 6.0.8! The error message is 'The disk 'My stuff' is so full that the desktop file can't be created' when mystuff.hfs is dragged to Mini vMac. The workaround is thus: Open mystuff.hfs with a System 7.1. Then transfer all the files (inside Mini vMac) to a System 6.0.8 image. This image will then work with System 6.0.8!”
copyright (c) 2015 Paul C. Pratt - last update 10/29/2015
how to work with
Disk Images
Mini vMac uses 'disk image' files, that hold the information of an emulated disk. For information about using disk images in Mini vMac, see the 'Floppy Drive' section of the Hardware Reference. This page is about transferring files from the host operating system into and out of disk image files. The exact methods available depend on the operating system.
General Notes
:
Macintosh
:
Windows
:
Linux
Update - The utilities ImportFl and ExportFl, which work in Mini vMac 3.0.0 and later, provide an alternative to the techniques described on this page for mounting disk images in the host operating, which has become increasingly difficult. (HFVExplorer for Windows is disappearing and HFS disk image support has become flaky at times in OS X.)
It is better to use a separate disk image for transferring files, since using a disk image with both Mini vMac and other software, which usually seem to have slightly different ideas of the disk image format, tends to eventually lead to corruption of the disk image. You should periodically delete your transfer disk image file and get a new one.
You can get a new blank disk image from the 'Blanks' archive.
Some versions of Mac OS for the Macintosh Plus, such as System 7.5.5, can mount DOS format images, which opens some more possibilities for transferring files on non-Macintosh host operating systems. However, this seems to be especially prone to corruption problems, so it is safest to use a new transfer disk image for each file transfer.
It is common for more recently created archives to not be usable by software that runs on a Macintosh Plus, even when the software in the archive works on a Macintosh Plus. In this case, you should first uncompress it on a modern Macintosh (or with Stuffit Expander for Windows version 7 as described below). On the other hand, old archives might not be understood by modern software, so you sometimes need to try both ways.
Update - Macintosh OS X 10.6.0 and later can no longer write to HFS disks or disk images. (It is still possible to mount them read only.) The main work around is to use ImportFl (along with tools to create an archive that preserves resource forks and other Macintosh specific information). Another possibility is to run a different emulator that can work both with HFS and HFS+ disk images (such as Basilisk II or Sheepshaver, according to David Sibley). And another possibility is Jesús A. Álvarez's FuseHFS. And there is HFS Disk Maker by Charles (author of Pacifist). Still another possibility is that if you have a file that is already on a 1.4M HFS floppy disk, and have a USB floppy drive, then Disk Utility can make an image of the floppy, and that image can be used with Mini vMac.
Renaming a disk image to end in '.dmg' (not '.dsk') makes it directly mountable in recent versions of Mac OS X.
The 'SetFType.dimg' version of 'SetFType' makes disk images directly mountable in Mac OS 9, and early versions of OS X.
Here are the steps to transfer a file into a new disk image:
Get a new 'blank' disk image, large enough to hold the file.
Rename the new disk image to end in '.dmg'.
In OS 9 or earlier (and some early version of OS X) drag it onto 'SetFType.dimg', to make it mountable. Click OK to the success notification. (When SetFType works, it may not be necessary to rename the image to end in '.dmg', but it doesn't hurt.)
Double click on the disk image to mount it. The icon should show up on the desktop (and in OS X, the top level computer folder), named 'untitled'.
Drag the file you want to transfer onto this mounted volume.
Eject this mounted volume, such as by dragging its icon to the trash. (It is very important to remember to do this in Mac OS X, because the operating system allows two programs to open the same file for writing, with no way for the programs to prevent it, a really bad design. Two different programs mounting a disk image file for writing will usually cause irreparable corruption.)
You can now mount the disk image file in Mini vMac, such as by dragging its icon into the Mini vMac window.
There are many reports that 'SetFType.dimg' fails to make an image mountable on Intel Macintoshes (and I've observed this myself). An alternative is to rename the disk image to end in '.dmg' (not '.dsk'). However, there is also one report of this failing also.
For OS 9 and earlier, mounting a disk image requires the application 'Disk Copy'. It is included with some versions of the OS, but if you don't have it installed you can download Disk Copy 6.3.3 from Apple.
The freeware program 'HFVExplorer' can view and modify Macintosh HFS disk image files. Its website and mirror have disappeared, but copies of HFVExplorer can still be found on the web.
Here are the steps to transfer a file into a new disk image:
Get a new 'blank' disk image, large enough to hold the file.
Launch HFVExplorer.
How To Rename Multiple Files
Navigate the panel on the left to find the folder containing the file to be transferred. Then select the file in the panel on the right. Choose 'Copy' from the Edit menu.
Choose 'Open volume' from the File menu. Select the new disk image file.
Choose 'Paste' from the Edit menu. Click 'OK' in the 'Select copy mode' dialog.
Quit HFVExplorer. (I don't know of any other way to make it close a disk image.)
You can now mount the disk image file in Mini vMac, such as by dragging its icon into the Mini vMac window.
HFVExplorer can decode MacBinary ('.bin') files. Just follow the steps above and it will be done automatically.
You should not use Stuffit Expander for Windows to expand an archive containing an application and then transfer the application using HFVExplorer. This will lose essential Macintosh specific information (such as the resource fork). You should instead use HFVExplorer to transfer the archive into a disk image, and then use Stuffit Expander running within Mini vMac to expand it.
But Stuffit Expander 4.0.1 can not handle some more modern archives. An alternative is that Stuffit Expander for Windows version 7 can correctly expand a Macintosh application and then re-encode it in MacBinary format. To enable this feature, choose the Options command in the View menu, select the 'Cross Platform' tab, and for 'Save Macintosh files in MacBinary format', choose either 'Always' or 'When a file contains a resource fork'. (This feature is also supposed to be in version 9 of Stuffit Expander, but it didn't work when I tried it.) With this feature enabled, even though Stuffit Expander doesn't rename the resulting files to end in '.bin' they are still in MacBinary format. HFVExplorer can decode them, or you can use binUnpk or Stuffit Expander from within Mini vMac.
You can mount a Macintosh HFS disk image file with commands such as:
However, this can only be done by the root user. Does any one know of a method that doesn't require root?
Update 12/10/2004 - Orion Sky Lawlor provides this tip:
Program To Rename Files
'I figured out one good way to shovel one's data into minivmac. You can make a little HFS image file from a collection of separate files using the (standard unix) CD authoring tool 'mkisofs':
This creates a HFS volume in the file 'stuff.hfs', which can immediately be mounted in minivmac. Because mkisofs is so cool, this even works if your Mac files have been mangled to work on another platform using AppleDouble, BinHex, PC Exchange, netatalk, or MacOS X's external format.'
This worked for me when I tried it on Red Hat Linux 9. I noticed the man page warns against using -hfs-unlock (which prevents the disk image being set as locked), since 'it's not a 'real' HFS volume.' And indeed, Disk First Aid and Norton Utilities found problems with the created disk image.
Rename A File Using A Batch File
Update 9/20/2013 - Hens Zimmerman writes that “mkisofs (on Linux) is obsolete. You can now use genisoimage instead, which creates a great hfs file that Mini vMac can read.” Wikipedia says that cdrkit (containing genisoimage) is a fork of cdrtools (containing mkisofs), due to licensing reasons.
Update 10/29/2015 - Another report on using genisoimage: “The image won't open with System 6.0.8! The error message is 'The disk 'My stuff' is so full that the desktop file can't be created' when mystuff.hfs is dragged to Mini vMac. The workaround is thus: Open mystuff.hfs with a System 7.1. Then transfer all the files (inside Mini vMac) to a System 6.0.8 image. This image will then work with System 6.0.8!”
copyright (c) 2015 Paul C. Pratt - last update 10/29/2015