Help with move file script
Help with move file script
- Subject: Help with move file script
- From: david okner <email@hidden>
- Date: Tue, 19 Dec 2006 12:01:06 -0800 (PST)
Hey everyone,
I am trying to move files with specific names in the file name to specific folders.
I can do it when it is only a file but if its nested within a folder my script doesn't work.
Here is what I have so far:
on adding folder items to InPut after receiving theFiles
tell application "Finder" to repeat with indvFile in theFiles
set fileName to name of indvFile as text
set fileName to name of (get every item of folder thisFolder)
try
if fileName contains "RHP" then
move indvFile to folder "Macintosh HD:Users:David:Desktop:RHP:" with replacing
else if fileName contains "LHP" then
move indvFile to folder "Macintosh HD:Users:David:Desktop:LHP:" with replacing
else
move indvFile to folder "Macintosh HD:Users:David:Desktop:Unknown:" with replacing
end if
end try
end repeat
end adding folder items to
Any help would be greatly appreciated!
Thanks!
David
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/mailman//archives/applescript-users
This email sent to email@hidden