help with folder copy
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