It works great and all that but this is where the strange behavior comes in. A few of the subdirectories (but not nearly all of them) get included in the zip file even though they have no archived files in them. The attached JPG shows this. Less than 2 percent of the subdirectories have this happen.

I was trying to figure out what was causing this and I know it is not any of the following:

* A hidden or system file
* Any file with the archive bit on

It is also not a Window 98 fluke because I have a Windows 95 machine that does the same thing with the same subdirectories.

Re: Empty Subdirectory Archived

I haven't used pkzip at the command line for a long time. Could it be that the archive bit on the directory is on, even though none of the files within are set to archive? Just stabbing in the dark here.

Re: Empty Subdirectory Archived

I don't think that subdirectories can have archive bits, they don't show up with the ATTRIB command. Even if they could, I'm using a PKZIP switch to reset the archive been after zipping so it should not be set next time.

Re: Empty Subdirectory Archived

I only checked this using Windows Explorer Properties. According to that dialog, they can. I just set the archive bit on one using a DOS box command and it shows up using attrib. But sorry, I can't help with the pkzip anomoly.

Re: Empty Subdirectory Archived

I finally figured out what was going on. The program I use to sync my computers copies all the modified files to a ZIP file. I use PKZIP and a batch file to handle all this. When I look at the files using WINZIP, it does not show any archived subdirectories so I assumed the problem could not be coming from the zip files. However, I just happen to find out that WINZIP defaults to not showing empty subdirectories and they were really in there.

They subdirectories were empty in the zip file not because they were empty on my computer but because I had not modified any of the files in those subdirectories. The batch file that unzipped the modified files to each computer used the ATTRIB command to turn off the archive bit. The only thing I can figure is that the command:

ARCHIVE D:*.* -M /S

does not reset subdirectories. PKZIP does when is zips archived files so I waited until there were no modified files and I ran PKZIP. It created a zip file with just the empty subidirectories and then reset the archive bit successfully. I then deleted that zip file and the problem went away.