On Tue, Mar 11, 2025 at 11:53 AM hms--- via Freedos-user <freedos-user@lists.sourceforge.net> wrote: > > Hello > Thanks Jim and Eric for your replies. [..] > The reason I have moved to DOSEMU2 is the ease of transferring files to > and from the DOS drive. As I previously alluded, my experience mounting > the QEMU DOS drive image and copying files, resulted in the original > file timestamps being replaced with the time of the copy. The file > timestamps are crucial for my application. (The way around this was to > copy files to the access drive (D:) and then use XCOPY to move them to > the C: drive - this taking 20 minutes or longer)
About preserving timestamps: If timestamps are important when copying files, I assume you use 'cp -p' to preserve them? Here's an example where I use guestmount to mount my QEMU virtual disk, and use the '-p' option with 'cp' to preserve timestamps. I've copied the contents of my FORTRAN directory from the virtual disk to my Linux /tmp directory (while preserving timestamps). Then I copy them again from /tmp to a new directory on the virtual disk. And you can see that the timestamps are preserved in the copy, because from the cp(1) manual page: '-p' is the same as --preserve=mode,ownership,timestamps (1) Copying from the virtual disk to /tmp: ~/virtualmachines/f/SRC$ cp -p -r -v FORTRAN/ /tmp/F 'FORTRAN/' -> '/tmp/F' 'FORTRAN/HELLO.F' -> '/tmp/F/HELLO.F' 'FORTRAN/CHARSET.TXT' -> '/tmp/F/CHARSET.TXT' 'FORTRAN/HELLO.OBJ' -> '/tmp/F/HELLO.OBJ' 'FORTRAN/COLUMNS.TXT' -> '/tmp/F/COLUMNS.TXT' 'FORTRAN/HELLO.EXE' -> '/tmp/F/HELLO.EXE' 'FORTRAN/LOOP.F' -> '/tmp/F/LOOP.F' 'FORTRAN/GUESS.F' -> '/tmp/F/GUESS.F' 'FORTRAN/VARS.F' -> '/tmp/F/VARS.F' 'FORTRAN/AREA.F' -> '/tmp/F/AREA.F' 'FORTRAN/TRAJ.F' -> '/tmp/F/TRAJ.F' 'FORTRAN/COMPLX.F' -> '/tmp/F/COMPLX.F' 'FORTRAN/ARRAY.F' -> '/tmp/F/ARRAY.F' 'FORTRAN/OVERFLOW.F' -> '/tmp/F/OVERFLOW.F' 'FORTRAN/OVERFLOW.OBJ' -> '/tmp/F/OVERFLOW.OBJ' 'FORTRAN/OVERFLOW.EXE' -> '/tmp/F/OVERFLOW.EXE' (2) Copying from /tmp to a new directory on the virtual disk: ~/virtualmachines/f/SRC$ cp -p -r -v /tmp/F F '/tmp/F' -> 'F' '/tmp/F/HELLO.F' -> 'F/HELLO.F' '/tmp/F/CHARSET.TXT' -> 'F/CHARSET.TXT' '/tmp/F/HELLO.OBJ' -> 'F/HELLO.OBJ' '/tmp/F/COLUMNS.TXT' -> 'F/COLUMNS.TXT' '/tmp/F/HELLO.EXE' -> 'F/HELLO.EXE' '/tmp/F/LOOP.F' -> 'F/LOOP.F' '/tmp/F/GUESS.F' -> 'F/GUESS.F' '/tmp/F/VARS.F' -> 'F/VARS.F' '/tmp/F/AREA.F' -> 'F/AREA.F' '/tmp/F/TRAJ.F' -> 'F/TRAJ.F' '/tmp/F/COMPLX.F' -> 'F/COMPLX.F' '/tmp/F/ARRAY.F' -> 'F/ARRAY.F' '/tmp/F/OVERFLOW.F' -> 'F/OVERFLOW.F' '/tmp/F/OVERFLOW.OBJ' -> 'F/OVERFLOW.OBJ' '/tmp/F/OVERFLOW.EXE' -> 'F/OVERFLOW.EXE' (3) Comparing the timestamps: ~/virtualmachines/f/SRC$ ls -l FORTRAN/ F/ F/: total 264 -rwxr-xr-x. 1 root root 148 Jun 29 2024 AREA.F -rwxr-xr-x. 1 root root 276 Jun 29 2024 ARRAY.F -rwxr-xr-x. 1 root root 175 Jun 29 2024 CHARSET.TXT -rwxr-xr-x. 1 root root 406 Jun 29 2024 COLUMNS.TXT -rwxr-xr-x. 1 root root 96 Jun 29 2024 COMPLX.F -rwxr-xr-x. 1 root root 213 Jun 29 2024 GUESS.F -rwxr-xr-x. 1 root root 81036 Jun 29 2024 HELLO.EXE -rwxr-xr-x. 1 root root 64 Jun 29 2024 HELLO.F -rwxr-xr-x. 1 root root 419 Jun 29 2024 HELLO.OBJ -rwxr-xr-x. 1 root root 239 Jun 29 2024 LOOP.F -rwxr-xr-x. 1 root root 81030 Sep 2 2024 OVERFLOW.EXE -rwxr-xr-x. 1 root root 160 Sep 2 2024 OVERFLOW.F -rwxr-xr-x. 1 root root 437 Sep 2 2024 OVERFLOW.OBJ -rwxr-xr-x. 1 root root 261 Jun 29 2024 TRAJ.F -rwxr-xr-x. 1 root root 280 Jun 29 2024 VARS.F FORTRAN/: total 264 -rwxr-xr-x. 1 root root 148 Jun 29 2024 AREA.F -rwxr-xr-x. 1 root root 276 Jun 29 2024 ARRAY.F -rwxr-xr-x. 1 root root 175 Jun 29 2024 CHARSET.TXT -rwxr-xr-x. 1 root root 406 Jun 29 2024 COLUMNS.TXT -rwxr-xr-x. 1 root root 96 Jun 29 2024 COMPLX.F -rwxr-xr-x. 1 root root 213 Jun 29 2024 GUESS.F -rwxr-xr-x. 1 root root 81036 Jun 29 2024 HELLO.EXE -rwxr-xr-x. 1 root root 64 Jun 29 2024 HELLO.F -rwxr-xr-x. 1 root root 419 Jun 29 2024 HELLO.OBJ -rwxr-xr-x. 1 root root 239 Jun 29 2024 LOOP.F -rwxr-xr-x. 1 root root 81030 Sep 2 2024 OVERFLOW.EXE -rwxr-xr-x. 1 root root 160 Sep 2 2024 OVERFLOW.F -rwxr-xr-x. 1 root root 437 Sep 2 2024 OVERFLOW.OBJ -rwxr-xr-x. 1 root root 261 Jun 29 2024 TRAJ.F -rwxr-xr-x. 1 root root 280 Jun 29 2024 VARS.F **Yes, the timestamps are preserved. Booting into FreeDOS, these are the timestamps I see there: > Directory of D:\SRC\FORTRAN > > . <DIR> 06-29-2024 3:25p > .. <DIR> 06-29-2024 3:25p > AREA F 148 06-29-2024 3:25p > ARRAY F 276 06-29-2024 3:25p > CHARSET TXT 175 06-29-2024 3:25p > COLUMNS TXT 406 06-29-2024 3:25p > COMPLX F 96 06-29-2024 3:25p > GUESS F 213 06-29-2024 3:25p > HELLO EXE 81,036 06-29-2024 3:25p > HELLO F 64 06-29-2024 3:25p > HELLO OBJ 419 06-29-2024 3:25p > LOOP F 239 06-29-2024 3:25p > OVERFLOW EXE 81,030 09-02-2024 12:30p > OVERFLOW F 160 09-02-2024 12:30p > OVERFLOW OBJ 437 09-02-2024 12:30p > TRAJ F 261 06-29-2024 3:25p > VARS F 280 06-29-2024 3:25p > 15 file(s) 165,240 bytes and: > Directory of D:\SRC\F > > . <DIR> 03-11-2025 8:42p > .. <DIR> 03-11-2025 8:42p > AREA F 148 06-29-2024 3:25p > ARRAY F 276 06-29-2024 3:25p > CHARSET TXT 175 06-29-2024 3:25p > COLUMNS TXT 406 06-29-2024 3:25p > COMPLX F 96 06-29-2024 3:25p > GUESS F 213 06-29-2024 3:25p > HELLO EXE 81,036 06-29-2024 3:25p > HELLO F 64 06-29-2024 3:25p > HELLO OBJ 419 06-29-2024 3:25p > LOOP F 239 06-29-2024 3:25p > OVERFLOW EXE 81,030 09-02-2024 12:30p > OVERFLOW F 160 09-02-2024 12:30p > OVERFLOW OBJ 437 09-02-2024 12:30p > TRAJ F 261 06-29-2024 3:25p > VARS F 280 06-29-2024 3:25p > 15 file(s) 165,240 bytes _______________________________________________ Freedos-user mailing list Freedos-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/freedos-user