Repeat question
Repeat question
- Subject: Repeat question
- From: Peter Mathiessen <email@hidden>
- Date: Mon, 05 Feb 2001 16:35:44 +0100
Hi,
I have a script that is supposed to check any folder in a parent folder for
files, this files will be copied down to the parent folder and later o
moved.
My problem is that the script just check the first file and then move the
whole folder, how to make the script to check all the files before it moves
the folder?
The script:
copy "Macintosh HD:mapp_struktur:" as text to the_vol
tell application "Finder"
set countfolder to alias (the_vol & "Mappar-In:")
set foldercount to the count of every item of countfolder
if foldercount 1 then
set searchFolder to alias (the_vol & "mappar-In:")
set felfolder to alias (the_vol & "Errors:")
set myListfolder to list folder searchFolder without invisibles
set sort_files_from_folders to list folder searchFolder without
invisibles
repeat with myfoldername in sort_files_from_folders
set my_fel_file to alias (the_vol & "Mappar-In:" & myfoldername)
if kind of my_fel_file is not "mapp" then
repeat until file type of my_fel_file is not "bzy "
delay 15
end repeat
if not file type of my_fel_file is "bzy " then
move my_fel_file to felfolder with replacing
end if
end if
end repeat
set searchFolder to alias (the_vol & "Mappar-In:")
set destinationfolder to alias (the_vol & "Temp_folder")
set destination_folder_folder to alias (the_vol & "Filer-in")
set myListfolder to list folder searchFolder without invisibles
repeat with myfoldername in myListfolder
set myFolder to alias (the_vol & "Mappar-In:" & myfoldername)
end repeat
try
set myList to list folder myFolder without invisibles
repeat with myFilename in myList
set myFile to alias ((the_vol & "Mappar-in:" & ,
myfoldername as text) & ":" & myFilename)
repeat until file type of myFile is not "bzy "
delay 30
end repeat
if not file type of myFile is "bzy " then
move myFile to destinationfolder with replacing
end if
end repeat
end try
try
move myFolder to destination_folder_folder with replacing
end try
End if