Results 1 to 5 of 5
  1. #1
    4 Star Lounger
    Join Date
    Jan 2001
    Location
    Atlanta
    Posts
    568
    Thanks
    7
    Thanked 1 Time in 1 Post

    Empty Subdirectory Archived

    This a strange, not problem, but behavior. I can live with it but I am curious about it so I am hoping someone can shed some light on it.

    I use a batch file to zipall the files on my D-drive that have the archive bit set on to an external drive as a form of backup. I use PkZip command line version and the command is:

    D:ZIPPKZIP -ADD=Incremental -LEVEL=9 -DIR=ROOT S-DRIVE D:*.* -EXCLUDE=D:RECYCLED*.* -EXCLUDE=D:_RESTORE*.*

    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.

    Ronny
    Attached Images Attached Images
    Ronny Richardson

  2. #2
    Platinum Lounger
    Join Date
    Nov 2001
    Location
    Melbourne, Victoria, Australia
    Posts
    5,016
    Thanks
    0
    Thanked 0 Times in 0 Posts

    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.

    Alan

  3. #3
    4 Star Lounger
    Join Date
    Jan 2001
    Location
    Atlanta
    Posts
    568
    Thanks
    7
    Thanked 1 Time in 1 Post

    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.

    Ronny
    Ronny Richardson

  4. #4
    Platinum Lounger
    Join Date
    Nov 2001
    Location
    Melbourne, Victoria, Australia
    Posts
    5,016
    Thanks
    0
    Thanked 0 Times in 0 Posts

    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.

    Alan

  5. #5
    4 Star Lounger
    Join Date
    Jan 2001
    Location
    Atlanta
    Posts
    568
    Thanks
    7
    Thanked 1 Time in 1 Post

    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.

    Ronny
    Ronny Richardson

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •