Property question
Property question
- Subject: Property question
- From: "Steve Suranie" <email@hidden>
- Date: Fri, 3 May 2002 11:00:24 -0400
- Thread-topic: applescript-users digest, Vol 3 #419 - 1 msg
Hi folks:
If I set this property in my AppleScript
property AAFolder : (current date) as string
and then reset the value of AAFolder within my code to another date (the modification date of the folder AA) the next time I run the script shouldn't the value of AA be the second value and not the current date? Am I misunderstanding how to use Property? Any help would be appreciated.
If this helps the code I am trying to write will check a series of folders to see if their modification dates have been changed from the last time they were checked and if so grab the contents and move them to a cumulus catalog. My thinking was that I would start with the current date as a base to begin with, check the modification dates against that (which will all not match the first time but that's ok) and then reset the value of the properties to the existing modification date. The next time I ran the script it would then only flag those folders which have had material added to them.
The code I am working with follows:
property AAFolder : (current date) as string
property ALFolder : (current date) as string
property ARFolder : (current date) as string
property DRFolder : (current date) as string
property HIFolder : (current date) as string
property HXFolder : (current date) as string
property L1Folder : (current date) as string
property L2Folder : (current date) as string
property L3Folder : (current date) as string
property L4Folder : (current date) as string
property L5Folder : (current date) as string
property MRFolder : (current date) as string
property MTFolder : (current date) as string
property N1Folder : (current date) as string
property N2Folder : (current date) as string
property N3Folder : (current date) as string
property N4Folder : (current date) as string
property N5Folder : (current date) as string
property N6Folder : (current date) as string
property NPFolder : (current date) as string
property OTFolder : (current date) as string
property PAFolder : (current date) as string
property PPFolder : (current date) as string
property PTFolder : (current date) as string
property RCFolder : (current date) as string
property SPFolder : (current date) as string
property XTFolder : (current date) as string
property ZZFolder : (current date) as string
property MPFolder : (current date) as string
tell application "Finder"
--setting up initial arrays
set magToCheck to {AAFolder, ALFolder, ARFolder, DRFolder, HIFolder, HXFolder, L1Folder, L2Folder, L3Folder, L4Folder, L5Folder, MRFolder, MTFolder, N1Folder, N2Folder, N3Folder, N4Folder, N5Folder, N6Folder, NPFolder, OTFolder, PAFolder, PPFolder, PTFolder, RCFolder, SPFolder, XTFolder, ZZFolder, MPFolder}
set magFolderList to {"AA", "AL", "AR", "DR", "HI", "HX", "L1", "L2", "L3", "L4", "L5", "MR", "MT", "N1", "N2", "N3", "N4", "N5", "N6", "NP", "OT", "PA", "PP", "PT", "RC", "SP", "XT", "ZZ", "MP"}
set thePath to the folder "merion_image_archive" of folder "Cumulus_Test" of folder "WebDesign" of disk "XXX"
set magListCount to count of every item of magFolderList
re
magListCount
set folderToCheck to item i of magFolderList as string
set folderModDate to modification date of the folder folderToCheck of thePath
set folderModDate to folderModDate as string
set currentFolderDate to item i of magToCheck as string
if folderModDate - currentFolderDate then
display dialog "Folder " & folderToCheck & " was modified on " & return & folderModDate
--this is where I think it should be updating the property values
set item i of magToCheck to folderModDate as string
--display dialog item i of magToCheck & return & return & folderModDate
else
display dialog "Folder " & folderToCheck & " is current."
end if
end repeat
end tell
_______________________________________________
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.