Calling all script experts - Wierd problem with a previously perfect script

Hi,
As script which used to work fine is now causing me big problems.
The line that is causing the problem is highlighted in the script editor as:
tell application "Finder" to set file_List to every file of entire contents of master_Folder -- Obtains all related files.
On running the script I get the following message:
Finder got an error: Can't make every file of entire contents of alias "Atlas Mac-Mini:Users:design:Desktop: TESTpictures - for script:Landscape copy:" into type reference.
As I said the script used to work fine, A couple of members of this forum have tried to rewrite the script for me (thanks to them) but I'm still gettig the same message. I'm wondering is there something wrong with my system (which otherwise works fine).
I'd appreciate any help and advice on what may be going wrong.
Thanks, Ray
In case it helps, here's the full script (which adds the file's path to the filename):
set master_Folder to (choose folder with prompt "Choose a folder for filename processing") -- Select folder.
set path_Depth to ((choose from list {1, 2, 3, 4, 5} with prompt "How many paths in these filenames?") as number) -- Select folder depth.
tell application "Finder" to set file_List to every file of entire contents of master_Folder -- Obtains all related files.
repeat with i in file_List
set {oAStId, AppleScript's text item delimiters} to {AppleScript's text item delimiters, ":"}
set fileItemsList to text items of (i as string) -- List of individual path items [disk, folder(s), file] of file of file_List.
set fileItemsCount to count fileItemsList -- Number of individual path items.
set fileItemsList to text items (fileItemsCount - path_Depth) through fileItemsCount of fileItemsList
set fullFileName to last item of fileItemsList as string -- Obtain full file name.
set AppleScript's text item delimiters to "."
try -- Obtain file name and file extension.
set file_Name to ((text item 1 of fullFileName as string) & "-") -- Obtain only file name, less any file extension..
set file_Ext to ("." & (text item 2 of fullFileName as string)) -- Obtain file extension.
on error -- Sets up a "If you can't do case 1 then try this" .
set file_Ext to "" -- If no File Extension exists, set 'file_Ext' to "".
end try
set AppleScript's text item delimiters to "-"
-- Change name of file.
set name of i to (file_Name & ((text items (1) through ((count fileItemsList) - 1) of fileItemsList) as string) & file_Ext)
set AppleScript's text item delimiters to oAStId
end repeat
Various   Mac OS X (10.4.6)  

Hello RaymondTomin,
I don't see any reason for Finder to throw such an error in the said line. Perhaps something is wrong in your system.
Try the following test scripts. If they fail on any folder you choose, I'm afraid something is surely wrong in your system, not in your script code.
(If they fail, create new user account and try them in it to narrow down the problem cause. Also try repairing disk and/or repairing permissions.
And it might help as well to clear some caches by using, e.g. Onyx:
http://www.titanium.free.fr/pgs/english.html
Or even to re-apply OSX's Combo Updater:
http://www.apple.com/support/downloads/
Good luck
H
-- TEST 1
set fda to choose folder
tell application "Finder"
items of item fda
end tell
-- END OF TEST 1
-- TEST 2
set fda to choose folder
tell application "Finder"
try
items of item fda as alias list
on error
items of item fda as alias as list
end try
end tell
-- END OF TEST 2
  Mac OS 9.1.x  

Similar Messages

Maybe you are looking for

  • Unable to Edit any event in iCal

    I am unable to edit any event in I cal, the only options I have available to me is to accept or decline the event, Help

  • Ipod touch stuck in USB- Itunes screen

    I just got this iPod from my sister for school. So I was downloading Itunes and I was putting some pictures on it. Then the next time I tried to connect it to my computer it kept saying something like "iPod could not be connected to computer please r

  • How do I add another file to a data disk?

    I have created a data disk with my superdrive. I would now like to add another file to the disk but all directions I find only apply to a "blank"disk. Thanks for any help you can give me.

  • Is it possible to use JPDK to get  script_prefix and dad_name

    Chris (Chris Broadbent), I want to use JPDK to get script_prefix and dad_name. I tried to use JDBC to call wwctx_api , but the get_script_prefix and get_dad_name functions return null value. Is there a better way doing this? Jim

  • Reg. Vendor evaluation,Vendor rating

    Dear All How to Vendor evaluation maintain,Vendor rating by turn over/Reliability/Quality. Thanks S.K.Rajakumar