An assumption is made that a disk image has already been created (or a suitable image has been downloaded) - we will be using C:\my_disk.ima in the following example. Unless using a disk image formatted with compressed NTFS, the image you are using must be greater in size than the files being copied. Any space remaining on the disk image after the files have been copied will be available as writable space when the system is booted from it.
The files can not be copied to the disk image from the operating system you are copying - boot a different Windows installation or a Preinstallation Environment (LiveXP, WinPE 3.0, etc) and install ImDisk.
In the example below the files will be copied from drive D: (the physical hard disk partition containing the Windows XP Installation) to drive R:
Note - the xcopy usage below has been copied from a post by boot-land member (and firadisk creator) karyonix (see here)
Alternative file copying methods include -