Jump to content

Welcome to Geeks to Go - Register now for FREE

Geeks To Go is a helpful hub, where thousands of volunteer geeks quickly serve friendly answers and support. Check out the forums and get free advice from the experts. Register now to gain access to all of our features, it's FREE and only takes one minute. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, post status updates, manage your profile and so much more.

Create Account How it Works
Photo

Winzip batch adds extra files


  • Please log in to reply

#1
Lady Cygnus

Lady Cygnus

    New Member

  • Member
  • Pip
  • 9 posts
I have a batch script that sets the variable %zipfile% and then executes the following command:

"C:\Program Files\WinZip\WINZIP32.EXE" -min -a -r -P "%zipfile%" cp manifest.xml

Given the following directory:

Top_Dir
  • \cp
  • \old_files
    • \cp
    • manifest.xml
  • manifest.xml
  • other_files

where the directory cp has a series of sub directories which contain pdf and xml files

This works great...except for two problems:

  • It sometimes adds "thumbs.db" in the zip file as in one of the lowest subdirectories of cp.
  • It adds the manifest file in the directory old_files (I don't think this one can be avoided given how I want the files to zip).

  • 0

Advertisements


#2
Neil Jones

Neil Jones

    Member 5k

  • Member
  • PipPipPipPipPipPipPipPip
  • 8,476 posts
Thumbs.db is generated by Windows and if you've had images in the folder in question and looked at them in thumbnail view, that's where the file comes from. It gets everywhere.

That being said one has to ask why are you using the command prompt when you can simply drag and drop a bunch of files into Winzip before you make the file?
  • 0

#3
Lady Cygnus

Lady Cygnus

    New Member

  • Topic Starter
  • Member
  • Pip
  • 9 posts

Thumbs.db is generated by Windows and if you've had images in the folder in question and looked at them in thumbnail view, that's where the file comes from. It gets everywhere.


The thumbnail view did indeed creates thumbs.db in the zip file. Checking "Do not cache thumbnails" in the folder options seems to stop the file from appearing - I don't use thumbnails enough to need the speed. Thanks for the reply - it gave me a starting point!

That being said one has to ask why are you using the command prompt when you can simply drag and drop a bunch of files into Winzip before you make the file?


It saves time - the zip file has the format cp_[top_dir]_YYYYMMDDHHMMSSSS.zip and getting the date/time right is a pain. I also have a hundred of these I need to zip - upload [failed] - fix - rezip - upload - check - fix {repeat ad infinitum} and I'm lazy. And finally, I like batch files - they add a special joy to my otherwise dull and uneventful job. :)
  • 0

#4
dsenette

dsenette

    Je suis Napoléon!

  • Administrator
  • 26,019 posts
  • MVP

I like batch files - they add a special joy to my otherwise dull and uneventful job.

i'm with you....batch files are great....want some real fun....redo all your batches in VBS hehe
  • 0

#5
Lady Cygnus

Lady Cygnus

    New Member

  • Topic Starter
  • Member
  • Pip
  • 9 posts

I like batch files - they add a special joy to my otherwise dull and uneventful job.

i'm with you....batch files are great....want some real fun....redo all your batches in VBS hehe


I actually don't know VBS yet. It's on my list to learn, but perl & batches are more useful at the moment.
  • 0






Similar Topics

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

As Featured On:

Microsoft Yahoo BBC MSN PC Magazine Washington Post HP