Re: Searching in nested folders
Re: Searching in nested folders
- Subject: Re: Searching in nested folders
- From: Michelle Steiner <email@hidden>
- Date: Thu, 6 May 2004 11:05:03 -0700
On May 6, 2004, at 10:28 AM, Bis wrote:
What I can't work out is a general algorithm which says:
1) get a list of all the items in the source folder
2) if any of the items is a quark file copy it to the destination
folder
3) if any of the items is a folder get a list of its items
4) if any of these items is a quark file copy it to the destination
folder
set the source_folder to choose folder
tell application "Finder"
set the File_list to the files of the source_folder
set the Folder_list to the folders of the source_folder
my copy_files(File_list)
my process_folders(Folder_list)
end tell
to copy_files(the_files)
--code to copy files goes here
end copy_files
to process_folders(the_folders)
tell application "Finder"
repeat with this_folder in the_folders
set these_files to the files of this_folder
my copy_files(these_files)
set these_folders to the folders of this_folder
my process_folders(these_folders)
end repeat
end tell
end process_folders
--
You can not change the world without perforce changing yourself.
_______________________________________________
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.