Button to create ZIP file & rename existing ZIP not working

Long subject, my apologies. I just wanted to be explicit in my problem.

Need: I need a button that will take the first selected file and create a ZIP file in the other pane. The ZIP file is to be named using the original file's name and then a date stamp.

Issue: This part all works just fine. The problem comes when I try to do it again. Instead of renaming the existing ZIP file, the selected file gets added to the existing ZIP file.

Example: File named "Foo.exe". Select it, hit button. ZIP file created in the other pane is named "Foo 2009-11-20.zip". All good. Now, later in the day after working on Foo.exe, I want to create another ZIP copy. If I select "Foo.exe" and press the button again, it's supposed to rename the new ZIP file "Foo 2009-11-20 (1).zip". But it doesn't; instead it gets added to the existing "Foo 2009-11-20.zip" file, automatically renamed inside the ZIP file. Does that make sense? I hope so & I hope someone can help me figure out where I went wrong. Thanx!

@firstfileonly @nofilenamequoting Copy ZIP RENAMEWHENSAME WHENEXISTS=rename CREATEFOLDER="{file$|noext} {date|yyyy-MM-dd}" MARKDESTARCHIVE=yes

If you use, for example

@firstfileonly
@nofilenamequoting
Copy ZIP RENAMEWHENSAME WHENEXISTS=rename CREATEFOLDER="{file$|noext} {date|yyyy-MM-dd} {time|HH-mm}" MARKDESTARCHIVE=yes

you will have distinct ZIP files.

WHENEXISTS=rename is applied to the items you copy or the items they conflict with in the destination. It is not applied to the actual folder you copy to. That's why the zip file is not renamed. (The zip file is the destination, not what gets copied. If there's a file with the same name within the zip as one you are copying then that might get renamed but never the zip itself.)

Abr's suggestion will work, or you could make the button rename any existing zip files before starting the copy if you don't want to put the current time into the zip's filename.

Phoig,
I think you will find the zip=keepfolder agument quite useful.
This then includes a first selected folder into the zip file.

I think Abr is correct, it is best to make a new zip file at each save enumerated by a date stamp that indicates hour, minute, and second.
I use yyyy-MM-dd_HH-mm-ss.

I see you are in Madison.
I'm in Green Bay, but I have attended the Unversity in Madison.
Good to hear from you.
As anyone will tell you, I'm not really coherent with DOpus recently,
so don't take my comments too seriously.
I'm glad if it helps, but reality is that I've been more interested in property and lumber than DOpus in the past few months and I doubt I'll be posting much in the near future.

Scred

Thank you everyone for your suggestions! I had wanted to not use the hour/minutes on the files in order to keep the archival directory "clean", but so be it. In fact, in looking at the operations here, I'm thinking that having the hour/minutes on the archives is probably going to be a good thing, long-term, so that's what I'll do. :slight_smile: (I'm using this at work, for backing up databases before programmers get in there & potentially scramble them; seeing as I am also one of those programmers & I know how my luck works, the more copies, the merrier... :slight_smile:

[quote="Scred"]Phoig,
I see you are in Madison.
I'm in Green Bay, but I have attended the Unversity in Madison.
Good to hear from you.
As anyone will tell you, I'm not really coherent with DOpus recently,
so don't take my comments too seriously.
I'm glad if it helps, but reality is that I've been more interested in property and lumber than DOpus in the past few months and I doubt I'll be posting much in the near future.

Scred[/quote]

Madison's always been the place I've wanted to live ever since I was young (I grew up in Watertown, almost exactly halfway between Madison and Milwaukee, so I was able to sample what each metropolitan area had to offer.) I, too, have a degree from UW-Madison & my wife's considering getting her MA from there once we've paid down some of our student loans a bit (and now that we're thinking of buying a house, the MA might be even a bit further away.) Love the city, but occasionally it does drive me batty. :smiley:

I've been using Directory Opus since some unreasonably low version number on my old Amiga 500. As sad as I was to see the demise of the Amiga (despite the valiant efforts of some of my siblings), I had mixed emotions about seeing DOpus on Windows - it was such an awesome product on the Amiga that I wasn't sure how well it would translate to the Windows world. In the end, I'm very happy that it did migrate to the Windows world & I'm able to use it both at home and at work. I've not had as much luck in convincing the rest of my coworkers in IS to give it a go, but then when they see some of the stuff I can do with it, they oooh & aaah. I'll keep working on them... :slight_smile: