• 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
help with folder copy
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

help with folder copy


  • Subject: help with folder copy
  • From: Brant Winter <email@hidden>
  • Date: Wed, 9 Feb 2005 12:52:48 +1000

hi - this is my first attempt at writing an applescript. I am using fetchftp to mirror a folder tree, this all works nicely. I then want to create a new folder in another location as the time and date, and then move the complete folder structure including files to another archive location. script is below:

tell application "Fetch 4.0.3"
mirror alias "
Macintosh HD:Users:brantwinter:Desktop:DSS:" to url "ftp://ibunce:@192.168.1.11/" format «constant nulltAut» without delete strays
quit
end tell

-- get the dates
set theMonth to (do shell script "date +%m") as string
set theDay to (do shell script "date +%d") as string
set theYear to (do shell script "date +%y") as string

set theHour to (do shell script "date +%H") as string
set theMinute to (do shell script "date +%M") as string
set theSecond to (do shell script "date +%S") as string
-- set the source
set sourceFolder to "Macintosh HD:Users:brantwinter:Desktop:DSS:"

-- make a new folder
try
tell application "Finder"
set destinationFolder to (make new folder at "Macintosh HD:Users:brantwinter:DSS:" with properties {theMonth & "/" & theDay & "/20" & theYear & " " & theHour & theMinute & theSecond})
as alias
display dialog "Folder created"
end tell


on error errorMsg
display dialog errorMsg -- the folder exists
end try

-- move folders
tell application "Finder"
move
every folder "Macintosh HD:Users:brantwinter:Desktop:DSS:" to folder destinationFolder
end tell


Kind Regards,

Brant Winter
email@hidden
 _______________________________________________
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

  • Follow-Ups:
    • where are the shell scripts ?
      • From: Christian Vinaa <email@hidden>
  • Prev by Date: Re: [ANN] New comprehensive AppleScript book
  • Next by Date: Re: Re: A question on shell scripting in AppleScript (Applescript-users Digest, Vol 2, Issue 91)
  • Previous by thread: How can I stop an Acrobat Reader slideshow?
  • Next by thread: where are the shell scripts ?
  • Index(es):
    • Date
    • Thread