WatchDirectory home page
WatchDirectory Startseite (Deutsche Version)
Site WatchDirectory (Français)
  Welcome, Guest. Please Login or Register
YaBB - Yet another Bulletin Board
   
  HomeHelpSearchLoginRegister  
 
Page Index Toggle Pages: 1
Zip Folders with folder name as Zip file name (Read 1797 times)
jimaus
Junior Member
**
Offline



Posts: 59
Australia
Zip Folders with folder name as Zip file name
Jan 29th, 2014 at 5:47am
 
Hi Gert,
I am trying to create zip files of complete folders including sub folders and contents.

I have tried using the Zip plugin as well as 7Zip but I can't quite get the syntax right.

I want to monitor a folder structure e.g.

AdArchive\Newspaper\2014-01-30\Publication\CustomerName\FolderWithStuffInIt\_Lin
ks

The monitor will be at AdArchive and look at the subfolders.
The files could be anything and any name, one consistency is an xml file at the "FolderWithStuffInIt" level.
I can look for this file and launch 7Zip, but I would like to name the Zip file as the "FolderWithStuffInIt.zip", this folder name can be anything, but will be the folder containing the xml file.

The bottom level, _Links folder is also consistent, but I do not want it to create its own zip file but be included in the  "FolderWithStuffInIt.zip" file
I have tried all sorts of settings, but cannot get it right.
If I run 7Zip from the command line with a -r switches, it will create 1 zip file of the name of the folder.

Any suggestions would be greatly appreciated?
Cheers, Jim
Back to top
 
 
IP Logged
 
Gert
YaBB Administrator
*****
Offline



Posts: 2232
The Netherlands
Re: Zip Folders with folder name as Zip file name
Reply #1 - Jan 29th, 2014 at 6:14am
 
Hello Jim,

Not much time today, but have a look at this blog:
http://blog-en.gdpsoftware.com/2013/06/free-program-parse-filename-into.html

If you write a little script, it should be easy to launch it wit "run a bat file" and give the resulting zip a proper name.

Gert
Back to top
 

Gert Rijs - gert (at) gdpsoftware (dot) com
Blog: http://blog-en.gdpsoftware.com/
End Alzheimer's: http://www.alz.org&&...
WWW WWW GdPSoftware  
IP Logged
 
jimaus
Junior Member
**
Offline



Posts: 59
Australia
Re: Zip Folders with folder name as Zip file name
Reply #2 - Feb 10th, 2014 at 5:49am
 
Hi Gert,
Thanks for the link, the issue got too complex, so I decided to move the files in their original folders and not zip them.
It was not worth the complexity.
Thanks, Jim.
Back to top
 
 
IP Logged
 
Page Index Toggle Pages: 1