Re: Can't re-name file with time stamp
Re: Can't re-name file with time stamp
- Subject: Re: Can't re-name file with time stamp
- From: Matt <email@hidden>
- Date: Wed, 20 Feb 2002 20:09:05 -0500 (EST)
You can't name a file with ":" on a Mac, since that is a reserved file
separator character. In fact, if you try it manually, it replaces the ":"
with "-" (at least on OS 9.2.1).
Try parsing the ":" characters out and replacing them with "_" or such and
that should help. There should be a bunch of archived messages, even from
as recent as last month on using (current date) to dynamically name
folders, and which may touch on this part of it.
Thanks,
-Matt
On Wed, 20 Feb 2002, Graham Fielder wrote:
>
I have a simple script in which I want to replace the name of a file with a
>
Time stamp.
>
>
tell application "Finder"
>
>
display dialog " Time " & the time string of (the current date)
>
>
set name of "TEST" to " Time " & the time string of (the current date)
>
>
end tell
>
>
>
>
The time dialog is displayed correctly but I get an error message saying :-
>
>
"Can't set name of "TEST " to "Time 21:04:20.".
>
>
What am I doing wrong?. (Using OS 9.2.2/AS 1.7)
>
_______________________________________________
>
applescript-users mailing list | email@hidden
>
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/applescript-users
>
Do not post admin requests to the list. They will be ignored.
>
Matthew Kozak
Rutgers University-Camden
email@hidden
**************************************************************************
"They that can give up essential liberty to obtain a little temporary
safety deserve neither liberty nor safety." -Ben Franklin
**************************************************************************
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.