Saving a Standalone
Eric Chatonet
eric.chatonet at sosmartsoftware.com
Wed Jul 27 11:02:39 EDT 2005
Hi David,
If I understand correctly :-)
You can use the files function in order to parse the file names, sort
the list and and get easily the current higher increment.
May be an All files function (that returns all file names in all sub
folders) can help you.
If so, tell me off list.
Best Regards from Paris,
Eric Chatonet.
Le 26 juil. 05 à 21:07, David Goldman a écrit :
> 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
----------------------------------------------------------------
So Smart Software
For institutions, companies and associations
Built-to-order applications: management, multimedia, internet, etc.
Windows, Mac OS and Linux... With the French touch
Free plugins and tutorials on my website
----------------------------------------------------------------
Web site http://www.sosmartsoftware.com/
Email eric.chatonet at sosmartsoftware.com/
Phone 33 (0)1 43 31 77 62
Mobile 33 (0)6 20 74 50 86
----------------------------------------------------------------
More information about the use-livecode
mailing list