Forums

Back to the Days of DOS

Started by Rick C November 5, 2021
I used to know DOS pretty well.  I am copying a lot of files to a flash drive for backup and need to verify what has been transferred by comparing directories.  A simple count is sufficient.  Trouble is I'm getting incomplete data.  

I'm using a DIR command to a file, then examining the files to see how many files are missing.  My text editor can do a diff if the counts don't match.  

When I check the total number in the properties it is far more than the number I'm seeing in the DIR command.  I can't understand why that is happening. 

Anyone know of a limitation of the DIR command on the number of files reported in a given directory? 

dir /b /on /s >dir.txt

-- 

Rick C.

- Get 1,000 miles of free Supercharging
- Tesla referral code - https://ts.la/richard11209 
Rick C wrote:
> I used to know DOS pretty well. I am copying a lot of files to a > flash drive for backup and need to verify what has been transferred > by comparing directories. A simple count is sufficient. Trouble is > I'm getting incomplete data. > > I'm using a DIR command to a file, then examining the files to see > how many files are missing. My text editor can do a diff if the > counts don't match. > > When I check the total number in the properties it is far more than > the number I'm seeing in the DIR command. I can't understand why > that is happening. > > Anyone know of a limitation of the DIR command on the number of files > reported in a given directory? > > dir /b /on /s >dir.txt >
Depends on the version IIRC. Early DOS versions had sharply limited number of entries in \, and maybe subdirectories as sell. I used to really like DOS 3.3 BITD. Cheers Phil Hobbs -- Dr Philip C D Hobbs Principal Consultant ElectroOptical Innovations LLC / Hobbs ElectroOptics Optics, Electro-optics, Photonics, Analog Electronics Briarcliff Manor NY 10510 http://electrooptical.net http://hobbs-eo.com
Rick C <gnuarm.deletethisbit@gmail.com> wrote: 

> I used to know DOS pretty well. I am copying a lot of files to a flash > drive for backup and need to verify what has been transferred by > comparing directories. A simple count is sufficient. Trouble is I'm > getting incomplete data. > > I'm using a DIR command to a file, then examining the files to see how > many files are missing. My text editor can do a diff if the counts > don't match. > > When I check the total number in the properties it is far more than the > number I'm seeing in the DIR command. I can't understand why that is > happening. > > Anyone know of a limitation of the DIR command on the number of files > reported in a given directory? > > dir /b /on /s >dir.txt
Hidden files? I need to know what commands are available. The current Windows group (alt.comp.os.windows-10) has some former DOS users.
On Friday, November 5, 2021 at 10:44:37 PM UTC-4, Phil Hobbs wrote:
> Rick C wrote: > > I used to know DOS pretty well. I am copying a lot of files to a > > flash drive for backup and need to verify what has been transferred > > by comparing directories. A simple count is sufficient. Trouble is > > I'm getting incomplete data. > > > > I'm using a DIR command to a file, then examining the files to see > > how many files are missing. My text editor can do a diff if the > > counts don't match. > > > > When I check the total number in the properties it is far more than > > the number I'm seeing in the DIR command. I can't understand why > > that is happening. > > > > Anyone know of a limitation of the DIR command on the number of files > > reported in a given directory? > > > > dir /b /on /s >dir.txt > > > Depends on the version IIRC. Early DOS versions had sharply limited > number of entries in \, and maybe subdirectories as sell. > > I used to really like DOS 3.3 BITD.
This isn't really DOS, it's Windows command. Hard to imagine they'd impose such a limitation. I did a Google search on how to do this and someone posted a PowerShell script. I couldn't get it to work because a command was not present on my machine. It wasn't worth it to me to figure that out. -- Rick C. + Get 1,000 miles of free Supercharging + Tesla referral code - https://ts.la/richard11209
On Friday, November 5, 2021 at 11:15:10 PM UTC-4, John Doe wrote:
> Rick C <gnuarm.del...@gmail.com> wrote: > > > I used to know DOS pretty well. I am copying a lot of files to a flash > > drive for backup and need to verify what has been transferred by > > comparing directories. A simple count is sufficient. Trouble is I'm > > getting incomplete data. > > > > I'm using a DIR command to a file, then examining the files to see how > > many files are missing. My text editor can do a diff if the counts > > don't match. > > > > When I check the total number in the properties it is far more than the > > number I'm seeing in the DIR command. I can't understand why that is > > happening. > > > > Anyone know of a limitation of the DIR command on the number of files > > reported in a given directory? > > > > dir /b /on /s >dir.txt > Hidden files? > > I need to know what commands are available. > > The current Windows group (alt.comp.os.windows-10) has some former DOS users.
The files I've identified so far were virus infected .htm or .xlsx or similar files attached to emails. They get removed when copied to the flash drive, but I guess not from the original directory. -- Rick C. -- Get 1,000 miles of free Supercharging -- Tesla referral code - https://ts.la/richard11209
Rick C <gnuarm.deletethisbit@gmail.com> wrote in
news:48f4c76d-fe15-47bf-8efb-a5280569d19bn@googlegroups.com: 

> I used to know DOS pretty well. I am copying a lot of files to a > flash drive for backup and need to verify what has been > transferred by comparing directories. A simple count is > sufficient. Trouble is I'm getting incomplete data. > > I'm using a DIR command to a file, then examining the files to see > how many files are missing. My text editor can do a diff if the > counts don't match. > > When I check the total number in the properties it is far more > than the number I'm seeing in the DIR command. I can't understand > why that is happening. > > Anyone know of a limitation of the DIR command on the number of > files reported in a given directory? > > dir /b /on /s >dir.txt >
Wow. Boot a Linux live disc and use that. As for DOS, you would not be able to have any long file names. And it may not even boot on some newer machines, even though they are X86. There are switches in dir where you could bring up file lists like all files starting with "A", and then compare shorter lists. That might make the task more "doable" from DOS. Or you could try the copy again, and all the files that are already existing could be skipped. DR DOS would likely have better "utilities". I used to keep a DR DOS utility directory on my machine because they worked under MS DOS whithout the version mismatch crap. If you ran a Linux session in Windows, which it does now, you could
Rick C <gnuarm.deletethisbit@gmail.com> wrote in
news:4892e562-090e-4d81-a564-8a3adc9ea6c4n@googlegroups.com: 

> On Friday, November 5, 2021 at 10:44:37 PM UTC-4, Phil Hobbs > wrote: >> Rick C wrote: >> > I used to know DOS pretty well. I am copying a lot of files to >> > a flash drive for backup and need to verify what has been >> > transferred by comparing directories. A simple count is >> > sufficient. Trouble is I'm getting incomplete data. >> > >> > I'm using a DIR command to a file, then examining the files to >> > see how many files are missing. My text editor can do a diff if >> > the counts don't match. >> > >> > When I check the total number in the properties it is far more >> > than the number I'm seeing in the DIR command. I can't >> > understand why that is happening. >> > >> > Anyone know of a limitation of the DIR command on the number of >> > files reported in a given directory? >> > >> > dir /b /on /s >dir.txt >> > >> Depends on the version IIRC. Early DOS versions had sharply >> limited number of entries in \, and maybe subdirectories as sell. >> >> I used to really like DOS 3.3 BITD. > > This isn't really DOS, it's Windows command. Hard to imagine > they'd impose such a limitation. > > I did a Google search on how to do this and someone posted a > PowerShell script. I couldn't get it to work because a command > was not present on my machine. It wasn't worth it to me to figure > that out. >
You may get a different set of available commands in powershell if you do not run it in administrator mode.
On 06/11/2021 03:26, Rick C wrote:
> On Friday, November 5, 2021 at 10:44:37 PM UTC-4, Phil Hobbs wrote: >> Rick C wrote: >>> I used to know DOS pretty well. I am copying a lot of files to a >>> flash drive for backup and need to verify what has been transferred >>> by comparing directories. A simple count is sufficient. Trouble is >>> I'm getting incomplete data. >>> >>> I'm using a DIR command to a file, then examining the files to see >>> how many files are missing. My text editor can do a diff if the >>> counts don't match. >>> >>> When I check the total number in the properties it is far more than >>> the number I'm seeing in the DIR command. I can't understand why >>> that is happening. >>> >>> Anyone know of a limitation of the DIR command on the number of files >>> reported in a given directory? >>> >>> dir /b /on /s >dir.txt >>> >> Depends on the version IIRC. Early DOS versions had sharply limited >> number of entries in \, and maybe subdirectories as sell. >> >> I used to really like DOS 3.3 BITD. > > This isn't really DOS, it's Windows command. Hard to imagine they'd impose such a limitation.
Sadly it isn't hard to imagine them making that sort of mistake at all.
> > I did a Google search on how to do this and someone posted a PowerShell script. I couldn't get it to work because a command was not present on my machine. It wasn't worth it to me to figure that out.
I prefer to do a CRC of every file on the destination against every file on the source. It has the advantage of verifying that the contents are (probably) the same in each place and readable too. I have seen way too many unreadable backups where the directory entries all looked fine but the file contents themselves were scrambled. Winmerge isn't too bad at comparing files and directories to find any differences between them (and it is free). https://winmerge.org/?lang=en -- Regards, Martin Brown
Phil Hobbs wrote:
> > Depends on the version IIRC. Early DOS versions had sharply limited > number of entries in \, and maybe subdirectories as sell.
The root had a limited number of entries (files or subdirectories) but subdirectories always had unlimited capacity because they are, themselves, files that can grow, as opposed to a fixed data structure like the root. -- Defund the Thought Police
Rick C wrote:
> I used to know DOS pretty well. I am copying a lot of files to a > flash drive for backup and need to verify what has been transferred > by comparing directories. A simple count is sufficient. Trouble is > I'm getting incomplete data. > > I'm using a DIR command to a file, then examining the files to see > how many files are missing. My text editor can do a diff if the > counts don't match. > > When I check the total number in the properties it is far more than > the number I'm seeing in the DIR command. I can't understand why > that is happening. > > Anyone know of a limitation of the DIR command on the number of files > reported in a given directory? > > dir /b /on /s >dir.txt
For DIR to include hidden and system files, add /a for attributes. -- Defund the Thought Police