VOGONS


First post, by Keatah

User metadata
Rank Member
Rank
Member

I'm looking for a file manager or utility/tool that I can use to move bulk and single files and folders from one drive to another. But it has to work in MS-DOS 5 or 6 and also preserve the time and date stamps.

I tried a good number of copy tools and no luck. Ideas and suggestions are welcome.

Reply 1 of 16, by Jorpho

User metadata
Rank l33t++
Rank
l33t++
Keatah wrote on 2020-06-03, 01:08:

I tried a good number of copy tools and no luck.

Maybe you could get us started by naming a few so as to avoid redundant suggestions?

I reckon if all else fails you could zip things up in one location and then unzip them in another.

Reply 2 of 16, by Keatah

User metadata
Rank Member
Rank
Member

Well I tried a few copy and xcopy replacement commands. Also tried a few small command-line backup tools. I don't recall the exact names, but they were generic freeware. I don't recall exactly what I tried, but they weren't full suites.

Zipping with PKzip, LHA, LZH, ARJ, ARC, work to some extent in that some versions preserve the dates on the files. But not the folder dates. Those are always set to present.

RAW disk imaging by putting the drive into my other computer and running RAWcopy from HDDguru on Windows XP lets me grab a complete image. Naturally. But I really need to work within and on the vintage system itself.

Reply 5 of 16, by Grzyb

User metadata
Rank Oldbie
Rank
Oldbie
Keatah wrote on 2020-06-03, 03:22:

Zipping with PKzip, LHA, LZH, ARJ, ARC, work to some extent in that some versions preserve the dates on the files. But not the folder dates. Those are always set to present.

All file managers and archivers should preserve modify time of regular files.
But I've never seen anybody demanding such preservation for directories, and I doubt if there's a suitable tool.

Actually - to my surpise - I've found Midnight Commander behaving like that, but it's primarily for Unix systems, probably never ported to DOS.

Żywotwór planetarny, jego gnijące błoto, jest świtem egzystencji, fazą wstępną, i wyłoni się z krwawych ciastomózgowych miedź miłująca...

Reply 7 of 16, by leileilol

User metadata
Rank l33t++
Rank
l33t++
Grzyb wrote on 2020-06-03, 09:26:

But I've never seen anybody demanding such preservation for directories, and I doubt if there's a suitable tool.

Even the newer programs available to modern windows can't get this straight:

- WinRAR can save folder dates, but can't extract them back
- 7-Zip saves folder dates and can restore extracted RAR's folder dates as well as 7z folder dates, but 7-zip's frontend has other functionality problems

If you're into preservation/personal backup, dates of folders (modified, created) can matter a lot 😀

apsosig.png
long live PCem

Reply 8 of 16, by derSammler

User metadata
Rank l33t
Rank
l33t
leileilol wrote on 2020-06-03, 11:08:

- WinRAR can save folder dates, but can't extract them back

That's actually because of Windows itself. Any change *inside* a folder will make Windows update the folder's time-stamp. So even if WinRAR would create the folder with the correct date, Windows would fuck it up as soon as WinRAR fills the folder with the extracted files. For this to work, the folder date must be set again after extracting. Not something many programmers of such tools cared about.

Reply 9 of 16, by Grzyb

User metadata
Rank Oldbie
Rank
Oldbie

I'm not sure if DOS API even allows to set a directory date/time.
INT 21h AX=5701h needs a file handle, but is it possible to open a directory to get the handle?

If it can't be done with DOS API, it's still possible to bypass DOS and modify physical sectors via BIOS calls - but this way is risky, easy to corrupt some data...

Normally, there should be no need to preserve date/time of directories, but if you're so anal about it - do image the disk.
Still, I think it's only worth it for genuine installation media.

Żywotwór planetarny, jego gnijące błoto, jest świtem egzystencji, fazą wstępną, i wyłoni się z krwawych ciastomózgowych miedź miłująca...

Reply 11 of 16, by yawetaG

User metadata
Rank Oldbie
Rank
Oldbie
Grzyb wrote on 2020-06-03, 09:26:

Actually - to my surpise - I've found Midnight Commander behaving like that, but it's primarily for Unix systems, probably never ported to DOS.

Maybe Norton Commander, which it was based off, behaves that way too?

Reply 12 of 16, by Grzyb

User metadata
Rank Oldbie
Rank
Oldbie
yawetaG wrote on 2020-08-29, 06:03:

Maybe Norton Commander, which it was based off, behaves that way too?

It doesn't.
Norton Commander for DOS does preserve dates/times for regular files, but not for directories.

As I already stated: I have never seen any DOS software capable of setting directory date/time, and AFAIK it's impossible to do with DOS API.

Żywotwór planetarny, jego gnijące błoto, jest świtem egzystencji, fazą wstępną, i wyłoni się z krwawych ciastomózgowych miedź miłująca...

Reply 14 of 16, by Grzyb

User metadata
Rank Oldbie
Rank
Oldbie
Keatah wrote on 2020-08-29, 10:54:

How is the date set initially on directory creation then? Something puts it there..

DOS does this.
An application calls INT 21h with AH=39h, and DOS creates the directory, with date/time fields set to current values...

hmm...

I think there's a possible workaround for the limitations of DOS API here, let's see...

INT 21h / AH=2Ch - get time, and save it
INT 21h / AH=2Dh - set time to desired value
INT 21h / AH=39h - create directory, with current time... ie. the desired time!
INT 21h / AH=2Dh - restore the saved time

Yes, an awful kludge, but still better than calling BIOS to modify physical sectors...

Żywotwór planetarny, jego gnijące błoto, jest świtem egzystencji, fazą wstępną, i wyłoni się z krwawych ciastomózgowych miedź miłująca...

Reply 16 of 16, by Grzyb

User metadata
Rank Oldbie
Rank
Oldbie

Yes, something like this:

INT 21h / AH=2Dh - set time to desired value
INT 21h / AH=39h - create directory, with current time... ie. the desired time!
INT 1Ah / AH=04h, INT 1Ah / AH=02h - get date and time from RTC
INT 21h / AH=2Dh - set DOS date/time to values read from RTC

But this would only work on AT or later, there's no standardized way to access the RTC on PC/XT.

Also, it should be noted that "INT 21h / AH=39h" may take quite some time, eg. when working on a diskette - turn on the drive motor, wait for it to spin up, wait for the stepper to position the heads, and so on, that would be hundreds on milliseconds...
but time stamp granularity in DOS is 2 seconds, right? So perhaps not a problem?

Żywotwór planetarny, jego gnijące błoto, jest świtem egzystencji, fazą wstępną, i wyłoni się z krwawych ciastomózgowych miedź miłująca...