Re: MS-DOS better than Applescript??
Re: MS-DOS better than Applescript??
- Subject: Re: MS-DOS better than Applescript??
- From: Ron Bishop <email@hidden>
- Date: Tue, 3 Sep 2002 15:17:32 -0500
There are several methods depending on if you want overwrite, or want to
check if the file already exists, if there is more than one
file,etc.,etc....here's a quick one.
-----------------------------
set theDestinationFolder to choose folder with prompt "Where do you want
the file copied to..."
tell application "Finder"
set theTargetFile to selection
duplicate theTargetFile to folder theDestinationFolder
end tell
(* basically duplicate (path to file) to (path to destination) *)
-----------------------------
MS-DOS is really better than AppleScript on a DOS based system....
Ron Bishop
www.daddydoodaa.com
On Tuesday, September 3, 2002, at 02:34 PM, Roman Fischer wrote:
I want to do a simple thing: copy a file into the same folder using an
other
name. In (good?) old MS-DOS days this was a simple thing:
Copy c:\abc\def.txt c:\abc\ghi.txt
Call me stupid but I did not find a solution to do this in Applescript
(MacOS X 10.1.5). After spending a few evenings in searching for a
solution
I still did not find one.
How can I do such a copy in Applescript (or is MS-DOS really better;-) ?
Thank you
Roman
_______________________________________________
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.