• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag
 

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Can't Make "File" into Type File
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Can't Make "File" into Type File


  • Subject: Can't Make "File" into Type File
  • From: Brian Cipresse <email@hidden>
  • Date: Sat, 16 Feb 2008 21:45:17 -0800

Hi, I'm trying to create a folder action that takes the "Not Added.m3u" file created by the script List Music Folder Files Not Added and automatically ADDs (not import) them to the iTunes Library. I've got the ADD command working but I cannot hard code the file path/name. I can, however, use the "choose file with prompt" which works but isn't what I want. 

The problem I'm having is identified below:
-- This method works, but I don't want to use it
--set myFile to (choose file with prompt "Select a file to read:")

-- This method does NOT work, but I wish to use it
set myFile to "ProDeuxHD:Users:Cippage:Music:NotAdded:Not Added.m3u"
--NOTE: I've tried to add of type {"TEXT"} here but get the error
--Can’t get "ProDeuxHD:Users:Cippage:Music:NotAdded:Not Added.m3u" of type("TEXT"). Access not allowed.
display dialog "Opening myFile for access..."
open for access myFile

display dialog "setting myFileContents to read myFile..."
set myFileContents to (read myFile)
--NOTE: After pressing OK from the previous dialog, I get the following Error
Can’t make "ProDeuxHD:Users:Cippage:Music:NotAdded:Not Added.m3u" into type file.
display dialog "Closing myFile..."
close access myFile

tell application "iTunes" to add myFile
Does anyone know how to troubleshot this problem? When I google search on:
applescript "make into type file"
I get only one web hit that doesn't open.

Thank you in advance for your time and consideration.
-G4M
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden

  • Follow-Ups:
    • Re: Can't Make "File" into Type File
      • From: Ed Stockly <email@hidden>
    • Re: Can't Make "File" into Type File
      • From: EBI Aktivitet <email@hidden>
  • Prev by Date: Re: Run AppleScript in the background (hide window)
  • Next by Date: Re: Can't Make "File" into Type File
  • Previous by thread: Re: Applescript crash
  • Next by thread: Re: Can't Make "File" into Type File
  • Index(es):
    • Date
    • Thread