I know I might be asking a little bit too much, but how difficult would it be to add a command line switch to create a "contiguous image" as opposed to just "an image" (possibly fragmented) ? (NB: I am really asking about the feasibility, not about who, when, etc... )
That would be very useful, e.g. when booting direct from the file with GRUB4DOS instead of booting from RAM. Obviously it is always possible to defragment the image with contig, but I thought it would be nicer to make sure it is contiguous in the first place...
More generally, when copying an image file from A to B, is there anyway to ask windows to make sure the destination is not fragmented ? or any utility like xxcopy that can do so ?
Not that I know of, but one could call CONTIG from the batch:
....
MOVE /Y HDDIMAGE.$$$ "%~nx1"
CONTIG "%~nx1"
MOVE /Y HDIMGPLN.$$$ "%~n1.PLN"
....
Another possibility is to create the file contiguous:
http://technet.micro...s/bb897428.aspx
To make a new file that is defragmented upon creation, use Contig like this:
Usage: contig [-v] [-n filename length]
I see that oriensol creates the files as HDDIMAGE.$$$ and then MOVEs it:
...
"%~dp0fsz.exe" HDDIMAGE.$$$ %Filesize% > nul
"%~dp0dsfi.exe" HDDIMAGE.$$$ 0 512 "%~dp0MBRFILE.$$$" > nul
CALL :MAKEPLN "%Targetfile%" HDIMGPLN.$$$
IF EXIST "%~nx1" ECHO Deleting %1
MOVE /Y HDDIMAGE.$$$ "%~nx1"
MOVE /Y HDIMGPLN.$$$ "%~n1.PLN"
ECHO.
ECHO Created hard-disk image %1 (Size=%Filesize%, Sectors=%TotSectors%, Cylinders=%MAXCyl%)
...
I am not seeing the reason for this, but this could work :
REN and MOVE should be equivalent in this usage....
%~d1
cd %~p1
"%~dp0contig.exe" -n HDDIMAGE.$$$ %Filesize% > nul
"%~dp0dsfi.exe" HDDIMAGE.$$$ 0 512 "%~dp0MBRFILE.$$$" > nul
CALL :MAKEPLN "%Targetfile%" HDIMGPLN.$$$
IF EXIST "%~nx1" ECHO Deleting %1
REN /Y HDDIMAGE.$$$ "%~nx1"
REN /Y HDIMGPLN.$$$ "%~n1.PLN"
ECHO.
ECHO Created hard-disk image %1 (Size=%Filesize%, Sectors=%TotSectors%, Cylinders=%MAXCyl%)
...
Wonko