I'm attempting to add a bit of "smarts" to the Save As Standalone function. When I save a standalone to the same location on my hard drive, If Revs finds a previous folder with the same base name, it dutifully increments the number. I.e. if I have a few previous versions I get a set of folders like this (assuming the base name is "revstack 1.0a"):

/Users/myname/Desktop/revstack 1.0a/
/Users/myname/Desktop/revstack 1.0a1/
/Users/myname/Desktop/revstack 1.0a2/
/Users/myname/Desktop/revstack 1.0a3/

etc.

Now inside each of these folders is the actual application saved under the base name - something like this:

/Users/myname/Desktop/revstack 1.0a/revstack 1.0a.exe
/Users/myname/Desktop/revstack 1.0a1/revstack 1.0a.exe
/Users/myname/Desktop/revstack 1.0a2/revstack 1.0a.exe
/Users/myname/Desktop/revstack 1.0a3/revstack 1.0a.exe

What I want to do is include a version number (which is stored in a field in the stack) as part of the application name. so I could get something like this:

/Users/myname/Desktop/revstack 1.0a/revstack 1.0a12.exe
/Users/myname/Desktop/revstack 1.0a1/revstack 1.0a13.exe
/Users/myname/Desktop/revstack 1.0a2/revstack 1.0a14.exe
/Users/myname/Desktop/revstack 1.0a3/revstack 1.0b1.exe

(I'm not too worried about the enclosing folder at this point - but that might be nice too...)

My basic approach was to use a shell command to rename the file with my version info. I was going to use the Standalonesaved msg to automate the whole thing, but ran into a problem in that the standalonesaved msg doesn't return the increment number that revolution adds to the enclosing folder (Desktop in this case) - i.e. I don't know how many previous versions might already exist in the directory I'm saving to. This makes deriving a path much more complex.

I suppose I could use a shell script to delete any folders that might already exist with the base name and then things might work...

Any comments/suggestions/help would be appreciated. (Oh yes, I'm on a Mac OS X and saving Windows Standalones...)

Thanks, David

_______________________________________________
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution

Reply via email to