• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag
 

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: help with folder copy
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: help with folder copy


  • Subject: Re: help with folder copy
  • From: email@hidden
  • Date: Wed, 9 Feb 2005 08:14:06 -0500

Here are one possible rework of the your posted code - less that of the 'Fetch' portion [I may look into that later].

-- You should not use '/' in a file or folder name - it messes things up from MacOS X'es UNIX perspective.
-- Use the UNIX command line's 'date ... %Y' instead of '20 & theYear'. Also consider using the 'Year Month Day' then
-- 'Hour Minute Second' format. This format automatically sorts the folders when a window's contents are displayed in 'List' view.
set theDate to do shell script ("date +%Y%m%d_%H%M%S")
-- However, you can use 'set theDate to do shell script ("date +%m/%d/%Y_%H%M%S")' which is what you want.


set sourceFolder to ((path to desktop folder) as string) & "DSS:" -- Generic way to access a folder on current users Desktop.
set newFolderLocation to ((path to home folder) as string) & "DSS:" -- Generic ways to access a folder in current users Home folder.
-- you could also use 'set newFolderLocation to ((path to current user folder) as string)'
set buttonName to "OK" -- Used to identify the only button in the display dialog box.
set displayDialogDelay to 3 -- Number of seconds to delay the automatic closing of the display dialog box.


tell application "Finder"
set destinationFolder to (make new folder at folder newFolderLocation with properties {name:theDate}) as alias
display dialog "Folder created" buttons {buttonName} default button buttonName giving up after displayDialogDelay
move folder sourceFolder to folder destinationFolder
end tell
--


SJWL
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Prev by Date: Re: HOWTO check if file is completly copied - OS9
  • Next by Date: Re: QuarkXPress 6.5 Scripting Strategy Question
  • Previous by thread: Re: where are the shell scripts ?
  • Next by thread: Re: Re: A question on shell scripting in AppleScript (Applescript-users Digest, Vol 2, Issue 91)
  • Index(es):
    • Date
    • Thread