moving files to a date named folder
moving files to a date named folder
- Subject: moving files to a date named folder
- From: Gabriel Trinity <email@hidden>
- Date: Tue, 13 May 2003 16:47:09 -0400
Hey all,
I am trying to write a script to move backup files that have been
generated by FileMaker to a folder named after the current date. Having
struggled with it unsuccessfully for some time I thought I might ask
those of you with more experience for any suggestions you might have.
When I run it it generates no errors but appears to do nothing. The
portion of the script that names the folder after the date works as I
have tested it in another script. Here is what I have so far:
set sourceDir to "Mac HD:FileMakerBackup"
tell application "Finder"
set fileStr to ".fp5"
set filesToMove to (every file of folder sourceDir whose name ends
with fileStr)
if (count of filesToMove) > 0 then
set temp to current date
set myStr to ((year of temp) as string) & " " & ((month of temp) as
string) & " " & ((day of temp) as string)
set targetDir to make new folder at sourceDir with properties
{name:myStr}
move filesToMove to targetDir
end if
end tell
Thanks in advance for any suggestions you might have.
Gabriel Trinity
_______________________________________________
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.