Re: Little Help...
Re: Little Help...
- Subject: Re: Little Help...
- From: Barry Wainwright <email@hidden>
- Date: Fri, 03 Nov 2006 21:01:53 +0000
- Thread-topic: Little Help...
On 3/11/06 17:13, "Michelle Steiner" <email@hidden> wrote:
> On Nov 3, 2006, at 10:08 AM, Barry Wainwright wrote:
>
>>> I strongly recommend naming that folder "BU_061102_1100" so that
>>> it will sort
>>> properly by name after you have a bunch of them.
>>>
>>> Ask if you want more on a shell script after the AppleScripters
>>> have their
>>> say.
>>
>> Sounds like a one line AppleScript to me ;-)
>>
>> tell application "Finder" to duplicate files of (desktop's folder
>> "theFolder") to (make new folder at (desktop's folder "OE_BkUps") with
>> properties {name:"BU_" & (get (((current date) as «class isot») as
>> string)'s
>> (words of it) as text)})
>
> The resulting folder is named BU_20061103T101147 which is not exactly
> what the OP asked for.
>
> -- Michelle
I know, but to be fair, the OP asked for a timestamp and showed an
'example', without stating that as a specific requirement. Also, it has
already been pointed out that a 'year, month, day... Format is preferable as
it sorts correctly.
Besides, I was concentrating more on making it a one-liner ;-)
Now I have had time to look at it properly, I find I was a little prolix.
Here's the minimalist version:
tell application "Finder" to duplicate files of desktop's folder "theFolder"
to make folder at desktop's folder "OE_BkUps" with properties {name:"BU_" &
(((current date) as «class isot») as string)'s words}
--
Barry
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/mailman//archives/applescript-users
This email sent to email@hidden