Command line switching

Posted by Larry on Super User See other posts from Super User or by Larry
Published on 2012-09-24T19:58:39Z Indexed on 2012/09/24 21:40 UTC
Read the original article Hit count: 209

Filed under:
|
|

I have read through some suggestions but I am just not technical enough to get this I think.

I am a CAD designer and each file has 5 files associated with it. I have 3 sets of 5 files, and each set needs to go into its own zip file, placed on a separate server.

For example:

"C:\Program Files\7-zip\7z.exe"  a file1.zip "O:\server2\map files\BC\BC.d*"-0
"C:\Program Files\7-zip\7z.exe"  a file2.zip "O:\server2\map files\BC\ON.d*"-0
"C:\Program Files\7-zip\7z.exe"  a file3.zip "O:\server2\map files\BC\AB.d*"-0

and I am in directory "S:\server\map files\provinces" (for example).

These lines run within an existing batch file and by the time it reaches the 3 lines above, it's in the S: directory sample above. So it's looking on my pc for the 7-zip program, creating 3 zip file names which it does, but places those zip files on a separate server which it doesn't and the first zip file also includes all the other 10 files, the second zip file the same plus the first zip file, and the third the same with the other two zip files making me think the code isn't recognizing the part after file1.zip where I am trying to tell it what files to include and where to place the zip files.

Ultimately, I want to either have the system create a new zip file if the old one was deleted, or copy the new files into the existing zip and overwrite any older files, and for these zip files to be placed in a separate location which is where we share our files with other personnel from within our company. The S: drive is for all originals, and O: is for sharing.

Is there a list of all switching options with many different samples?

© Super User or respective owner

Related posts about command-line

Related posts about batch-file