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
-
Wierd problem with web start in windows 7
I have a wierd problem with my web start app in windows 7, it just hang it self. it work fine in windows XP and Vista.
The wierd thing is that i can open the app but when i press on a specific button that will make a jlabel present a .png image everthing crash. why do i get this problem now? when i start the app, i load some pic i jlabels and that seems to work fine, but when i do it under the exection it seems to crash, why?
Should i do something different to make the app work in windows 7?
I hope someone can help me out!!You should:
a) open the console (java control panel, advanced options) and see the stackTrace (if any). If it's not there check for swallowing.
b) post a code snippet, to at least show how and where you retrieve the png. Possibly a SSCCE.
c) check if this happens also running as a standalone app (may be more Swing-related than JWS-related).
Bye. -
Hi all I have a problem with my ipod touch 4g
hi all I have a problem with my ipod touch 4g update and does not let either turn left stays in the loop of the block when I try to update the error stays in 3914, I looked at the host file and everything is in order any one could help me?
I think you meant 3194
3194
See:
iOS: Restore error 3194 or 'This device isn't eligible for the requested build'
How to Fix iTunes Error 3194?
Fix Error 3194 from iTunes during iPhone restore
Try on another computer -
I can't download any apps, it keeps telling me "There is a billing problem with a previous purchanse"! I've checked all my account info and can't figure out the prob??
Contact Itunes support and ask them
-
Dear all, I have a problem with charging. When i intend to charge my phone while its on, it does not charge. However, If i were to switch it off and put for charge, it charges. How do i fix this?Help.
First, update iTunes, then connect the phone to the computer and do a restore. This will also get your iOS up to date. Your phone should operate correctly after doing this, if not, you will most likely need to have the phone serviced or replaced.
-
Error::There is a billing problem with your previous purchase please check your billing information
Ask for assistance:
Contact Apple Support
https://getsupport.apple.com/GetproductgroupList.action -
When going to update it says there is a billing problem with the previous purchase when I go to update it still won't let me download and all the info is correct. How do I fix this?
You have to email iTunes Store Support about this issue now. You can get started here. Change the country in the upper right if necessary.
https://ssl.apple.com/emea/support/itunes/contact.html -
I have an Australian card associated with itunes and the App Store. However, I am no longer in Australia and I wish to change my country of residence and card to the UK/English. When I try to change country, it says there's a problem with a previous purchase, meaning I have no money on the Australian card and therefore the previous purchase cannot be billed.
The only way I can pay for the previous purchase is by adding an English card but it won't let me do this.
Does this mean I have to somehow put money on the old Australian card to pay for the previous purchase? Or is there a way I can transfer the bill to an English new card?
Cheers guys
ArronYou are right, but how could i send it to Apple? when the phone company first replaced my iphone they had in stock alots of iphones and they just sent mine back to Apple and gave me a new one, so all i did is to give them my phone, but now how could i sent it to Apple? and i cant send it by myself, and the store wont do that, its a lost for them.. so sending it to Apple wasnt an option from the begining.
and for the record, i dont think the store where i bought it is an authorized shop.. its just a store who boughts phone's from Apple in a low price and sells it in much more money.. -
I have a new visa debit card, I have tryed several times to put in this new information into my IPad. The program keeps telling me.
There's a billing problem with a previous purchase. Please update your payment method.
The program will not let me update, what am I doing wrong. rose165I would love to have a phone number to call someone with apple on this issue.
-
Hello I have a problem to update Imovie. I want to update but I get "There is a billing problem with a previous purchase" What do I do?
Restore from iTune Backup
1. Settings>General>Reset>Erase all content and settings
2. You will be asked twice if you want to erase iPad
3. Slide to set up
4. Select Language
5. Select Country
6. Enable Location Service
7. Choose Wi-Fi Network
8. Enter Wi-Fi password
9. (a) Setup as new (b) Restore from iCloud Backup (c) Restore from iTune Backup
10. Select "Restore from iTune Backup"
11. You will be instructed to connect to iTune (computer)
On computer
12. Two options offered
13. (a) Set up as new iPad (b) Restore from backup (a list of backup will be shown)
14. Select Restore from backup and select the backup
15. Continue
16. Restoring iPad from backup
17. The settings for iPad restored -
There is a problem with the arabic vowelization in the browser version 4.0 although we didn't face this problem with the previous versions ,so please fix it up quickly because it affects on our work
Do you have an Arabic version of Firefox installed which isn't displaying the vowelization correctly, or are you trying to read it using an English language version?
There are a few add-ons for Arabic which might possibly help here: [https://addons.mozilla.org/en-US/firefox/search/?q=arabic&cat=all&x=0&y=0 Arabic add-ons] -
I am trying to download an app. I get a message that says there is a problem with a previous purchase. I log into the store and there is no history. I updated my address but continue to get the same message and cannot download my desired app. Any suggestions please?
If you get a pop-up message asking to update Firefox or plugins or scanning for malware then such a message is likely a scam and you should never respond to such an alert to avoid getting infected with malware.
*Only update Firefox via "Help > About" or by downloading and installing Firefox from the Mozilla server and never via a pop-up or link on a web page.
*Plugins should only be updated via the plugin itself or by visiting the home page of the plugin.
Do a malware check with several malware scanning programs on the Windows computer.
Please scan with all programs because each program detects different malware.
All these programs have free versions.
Make sure that you update each program to get the latest version of their databases before doing a scan.
*Malwarebytes' Anti-Malware:<br>http://www.malwarebytes.org/mbam.php
*AdwCleaner:<br>http://www.bleepingcomputer.com/download/adwcleaner/<br>http://www.softpedia.com/get/Antivirus/Removal-Tools/AdwCleaner.shtml
*SuperAntispyware:<br>http://www.superantispyware.com/
*Microsoft Safety Scanner:<br>http://www.microsoft.com/security/scanner/en-us/default.aspx
*Windows Defender:<br>http://windows.microsoft.com/en-us/windows/using-defender
*Spybot Search & Destroy:<br>http://www.safer-networking.org/en/index.html
*Kasperky Free Security Scan:<br>http://www.kaspersky.com/security-scan
You can also do a check for a rootkit infection with TDSSKiller.
*Anti-rootkit utility TDSSKiller:<br>http://support.kaspersky.com/5350?el=88446
See also:
*"Spyware on Windows": http://kb.mozillazine.org/Popups_not_blocked -
there is a (billing problem with a previous purchase.Please update your payment method)... After updating I receive the following message (your payment method was declined,Please enter another payment method
I get this sometimes with the card I've been using for years. I'm not sure what happens but usually, all I have to do is go into iTunes and edit my card info. Instead of changing anything, I just save the changes even though I didn't make any and then iTunes will then automatically resubmit the over due charges.
This same thing also happens with SiriusXM account and at least once ir twice a year, I get a past due notice in the mail. Frustrating even though there is nothing wrong with my card. -
There's a billing problem with a previous purchase. please update your payment method. I need a help on how to clean up all my last records for me to use another Visa card again or Master Card.
Contact iTunes Customer Service and request assistance.
Apple Support iTunes Store Contact Us -
I can't download from app store apps. if i try then open account and ask me shange payment type because there is a billing problem with a previous purchase. I download one game 0.99 and nothing more! help me. How can i contact with apple?
Click here and ask the iTunes Store staff for assistance.
(102938)
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