Error "Can't make every file of ... into type alias list" - please help!

Hi
I am trying to adapt a script that uses Max (an audio conversion tool) to convert files in a folder to another format. The original script which I found on a forum asked the user to choose the folder with the files in which need to be converted, but I want to specify the folder in the script so that it can be automated. So I changed the line:
set sourceFolder to choose folder
to
set sourceFolder to "Macintosh HD:Users:nick:Desktop:test:"
However I then get the error (this is the only line in the script I changed and the original script works fine):
error "Can’t make every file of "Macintosh HD:Users:nick:Desktop:test:" whose name extension = "m4a" into type alias list." number -1700 from every file of "Macintosh HD:Users:nick:Desktop:test:" whose name extension = "m4a" to «class alst»
Could someone let me know why I am getting this error and how I can sort it. The full script is below.
Thanks
Nick
tell application "Max" to activate
tell application "Finder"
set sourceFolder to "Macintosh HD:Users:nick:Desktop:test:"
set theFiles to (every file of sourceFolder) as alias list
repeat with aFile in theFiles
tell application "Max"
convert aFile
end tell
delay 1
tell application "System Events"
tell process "Max"
click button "Convert" of tool bar of window "File Conversion"
set encoderOpen to true
repeat while encoderOpen is true
try
window "Encoder"
on error
set encoderOpen to false
end try
end repeat
end tell
end tell
end repeat
end tell

nick_harambee wrote:
set sourceFolder to "Macintosh HD:Users:nick:Desktop:test:"
This saves a string (Macin...) under the variable sourceFolder. You then try and use sourceFolder as an alias which doesn't work. To fix the situation try saving sourceFolder as an actual alias in itself. For example...
set sourceFolder to folder "Macintosh HD:Users:nick:Desktop:test:"
or perhaps
set sourceFolder to "Macintosh HD:Users:nick:Desktop:test:" as alias
Either of those should correct your problem.
When using "(choose folder)" you get an alias returned which is why the original script worked fine.

Similar Messages

  • Applescript "Finder got an error: Can't make document file"

    I can get the file contents if I use choose file but if I do it this way, I get the error:
    error "Finder got an error: Can’t make document file ... to file
    Code:
    tell application "Finder"
              set theFolder to (choose folder with prompt "Select the start folder")
              set file_list to every file of theFolder
              repeat with myfile in file_list
          log (name of myfile as string)
          set fileContents to read myfile
          set fileText to paragraphs of (fileContents)
          repeat with nextLine in fileText
              if length of nextLine is greater than 0 then
                  log nextLine
              end if
          end repeat
              end repeat
    end tell

    Changing
    set fileContents to read myfile
    to
    set fileContents to read (myfile as alias)
    sorted it!

  • I have macbook pro 13" I want to know how to copy files from my mac to the external Toshiba Hard Drive. I can't even delete files from my external hard drive. please help me my macbook HD is almost full and I have to copy my images to the Toshiba HD

    I have macbook pro 13" I want to know how to copy files from my mac to the external Toshiba Hard Drive. I can't even delete files from my external hard drive. please help me my macbook HD is almost full and I have to copy my images to the Toshiba HD

    To delete files from your external HDD, attach it to your MBP and drag the unwanted files to trash and then empty trash.
    Then you select the files that you want to transfer by 'drag and drop' to the external HDD and trash the files on your MBP.
    Ciao.

  • How to load externl files (PDF) into BLOB column.  Please help.

    Hi All,
    I've currently been working on loading many external binary files (PDF) into BLOB column. After some digging, I learn that the SQL*LOADER can be used to load data from external files into table. I also got help from another forummate mentioning to use PL/SQL procedure to do so. Since I have not done anything like this before. So, my question is what is the simple approach needed to upload PDF files into a table(there is only one table containing BLOB column in my database). In addition, the LOBs can not be query-able, I wanted to list the contents of the LOBs column to make sure that I did successfully upload data into the database. How can I do that?. I do need your help. Please direct me step by step how to do so. Your help is greatly appreciated.
    Regards,
    Trang

    Hi,
    If the following link helps to you then great.
    http://www.exefind.com/oralobeditor-P25468.html
    Regards,
    Sailaja

  • IBooks author: Can't open the file because "index.xml" is missing, please help!,

    A project that I was working on yesterday and I didn't close it, today when I wanted to work on it and opened a new page there was a huge X on the page so I decided to quit ibooks then reopen it, saved all my changes first of course, but then when I tried opening it literally 10 seconds later it says the index.xml file is missing, this is my technology project due tomorrow please help!

    This or a simmilar problems arose just after the last  iBA update. There is a very long thread dealing with this.
    I had a similar problems and nothing cured it until I contacted support and  they gave me a link to upload to their server, they repaired my file and I downloaded it.
    It actually took from start to  finish about 2 weeks.
    I "huge X" on any page usually indicates an image or similar content is missing.
    The usual suggestions are to close everything  down and do a re-boot.
    I suggest a search of this forum for the thread may be an idea.  Try this
    https://discussions.apple.com/search.jspa?peopleEnabled=true&userID=&containerTy pe=&container=&spotlight=false&q=index.xml+file+is+missing
    If you make a copy of your book file and change .iba to .zip, you can open the file and check if the index page really is missing.

  • Can't open IDML files on CS6 or 5.5 Please help

    I just purchased and downloaded IDCS6. I have updated all the plugins. I "saved as" IDCS4 or old, a document I was working on. Now I can't open with either version of ID. Please help! How can I get this document to open? I am using Windows, 64-bit OS

    I received the .idml fileyou sent, and it won't open here, either. It looks to me as if it may not be complete. Since you didn't send the .indd file I can't do much more.
    I see though that you managed to get the file to export properly. In spite of it being listed now under the Save As menu, making .idml files is an Export function and it is a background task so even though the dialog closes and you can go back to work immediately, the file may not be ready. There is a samll inidcator icon of scrolling horizontal lines that appears on the right of the Menu bar while background tasks are in progress, and you can open the Background Tasks panel from Window > Utilities for a real progress bar. I suspect you may have simply tried to open the original .idml file before it completed.
    As far as opeing as Untitled, that unfortuantely, is expected behavior, and it is a pain in the neck. You are creating a new file as far as ID is concerned, so it names it Untitled. When you save, you should probably use a new name to avoid overwriting the original .indd file.

  • I can't make Recovery on my notebook .... please help ?

    Hello , i am trying to install OS from recovery partition i have on my notebook , but when i press F11 at start up it's show me this error  File :\Boot\BCD status 0xc0000225.  failed to boot , so what i need to fix this problem , by the way last time i installed OS from recovery partition i mentioed before i made shrink to C partition to get more space on it .
     notebook 7030se , win 7 64bit

    Restart the computer and before Windows launch, press F10.  When a new screen comes up, press F9 to reset the BIOS back to default condition.  If this does not work, upon restarting the computer, press F2 to run the self diagnostic tests(hard drive, startup, memory...)  Good luck! 
    I am having problem with my labtop too.  It has a missing .DLL file and I don't have the system recovery disc.  The F11 recovery option did not fix the problem.

  • I forget the passcode for my Iphone 5..what can i do without loosing my data..? please help me

    i create a passcode on my iphone 5 but i forget it and i can not use my device ..i want to remove this passcode without making format or restore to avoid loosing my data..any other solution..? or can i make a backup before restoring..? please help me

    Hopefully the "If you have previously synched your device using iTunes" section will help you:
    http://support.apple.com/kb/HT1212

  • AppleScript error on Tiger only: "can't make file into type alias"

    Hi,
    I'm successfully using this smart TextWrangler applescript from this webpage for opening files on the same folder as the current document:
    http://blog.ampli.fi/textwrangler-open-file-from-directory-of-current-file/
    It works fine on Mountain Lion.
    However, when I try it on Tiger 10.4.11, this error dialog appears: "TextWrangler got an error: Can't make [file] into type alias".
    The script basically gets the path of the current document in TextWrangler and posts a file chooser on such path.
    I guess these are the lines that Tiger doesn't like:
      set current_path to POSIX path of current_file
      set new_file to choose file default location (current_path) with multiple selections allowed
    open new_file
    After googling for the error "can't make [] into type alias", I tried to change such lines to:
      set current_path to (POSIX path of (current_file as alias))
      set new_file to choose file default location (current_path) with multiple selections allowed
    open new_file
    But, however, the same error remains.
    Do you have any idea on how could this work?
    Thanks!

    wow, 10.4...
    try this:
    set current_path to current_file
    set new_file to choose file default location (current_path) with multiple selections allowed
    open new_file
    I'm not certain when the standard applescript dialogs were updated to accept posix paths, but it may have been 10.5.

  • "iCal got an error: Can't Make id of event of calendar 4 into type referen

    Hello everyone. i am completely new to MAC's and very new to scripting. Thanks in advance for any help.
    I am tying to run an Apple Script that is called Scheduled Delivery.
    I'm running 10.4.10 and have the most recent version of the script.
    Basically what happens is I type up and email, add in the email address and save it to my drafts folder. The Scheduled Deliver script, when run, finds all the emails in my drafts folder and uses iCal to schedule a time to mail them (which is a specific time I enter)
    Here is my process I go through-
    I run the apple script by double clicking on the Scheduled deliver Icon, which was in my appications/MailScript folder. It brings up a new window with all my saved drafts. I select the draft I want to schedule a specific time to deliver. This is great.
    When I click on the lower right button "Update Schedule" I get an error message...
    "iCal got an error: Can't Make id of event of calendar 4 into type reference. (-1700)"
    I cannot figure this out. I've tried testing it anyway. I can close the Scheduled Deliver window but the "Done" button is always grey out. It seems to place an event in iCal but no message ever gets sent.
    Any help is greatly appreciated.
    Thanks

    Anyone? Any help is greatly appreciated.

  • Can you make an existing document into a .pdf file?

    can you make an existing document into a .pdf file? I used to use pdf factory before my system recovery. I do not want to reinstall that program. Can I do this in Acrobat Reader 7?

    Adobe sell Acrobat (in various versions) to do this.
    Aandi Inston

  • How can I make an iPhoto slideshow into a DVD in Lion?

    How can I make an iPhoto slideshow into a DVD in Lion?

    If you MacBook Pro came with Lion preinstalled then you will not have a copy of iDVD.  That's because iDVD and iWeb have been discontinued by Apple and is not longer being included in iLife.
    You can purchase a copy from Amazon.com: iLive 11.
    If you do have Lion this post will self destruct in 10, 9, 8... seconds and you can follow Terence's directionsl
    As for iDVD the following is a recommended workflow to follow;
    Once you have the project as you want it save it as a disk image via the  File ➙ Save as Disk Image  menu option.  This will separate the encoding process from the burn process. 
    To check the encoding mount the disk image and launch DVD Player and play it.  If it plays OK with DVD Player the encoding was good.
    Then burn to disk with Disk Utility or Toast at the slowest speed available (2x-4x) to assure the best burn quality.  Always use top quality media:  Verbatim, Maxell or Taiyo Yuden DVD-R are the most recommended in these forums.
    OT

  • Dynadock V10 - " error can not find installation file" INSTALL ERROR

    Hi I have a toshiba dynadock V10.
    Every time i try to install the drivers it says " error can not find installation file". I have downloaded the latest drivers and switched off my anti virus and shut off all running proiceses and no go. There are a few references to this on the internet but none has a solution.
    I amn trying to install it on an equium U400 running windows 7.
    Funnily enough it loaded on an old dell pc easily!
    I have spent hours searching the net and there is no answer. I dont have anything showing in programs to uninstall.
    Thanks

    >Funnily enough it loaded on an old pc easily!
    Hi
    This means that drivers are ok and there must be something wrong with the system preinstalled on Equium U400.
    How did you proceed?
    Its important that you would NOT connect the Dynadock to the notebook before the drivers and software installation has not been finished.
    Therefore you have to install the software firstly. Then after new reboot connect the Dynadock to the notebook and the installation would finish the next steps.

  • Mail Server Error: Fatal error: can't write proc file

    I am a novice with OS X Server. It has been running fine for months but now I am having trouble. I get the following error log in SA:
    Dec 3 19:19:24 MasterControl imap[1761]: Fatal error: can't write proc file
    Dec 3 19:19:25 MasterControl imap[1763]: DBERROR: dbenv->open '/var/imap/db' failed: Permission denied
    Dec 3 19:19:25 MasterControl imap[1763]: DBERROR: init() on berkeley
    Dec 3 19:19:25 MasterControl imap[1763]: IOERROR: creating /var/imap/proc/1763: No space left on device
    The drive has lots of space left on it.
    Also in the maintenance accounts section, it states for every user there is an unknown mailbox path in the mailbox store.
    Any help would be appreciated.

    I rechecking the situation, the drive is showing that it is totally full. Its a 60 gig drive that yesterday had 10 gigs on it...now it is full. Not sure where the other 50 came from or where they are. I've just deleted some programs and the drive is still showing full.

  • I keep on getting this error when i try to copy files to my 2T Time Capsule, Please help im running out of space on my MacBook Pro.... The operation can't be completed because an unexpected error occurred (error code -50)

    I keep on getting this error when i try to copy files to my 2T Time Capsule, Please help im running out of space on my MacBook Pro....
    The operation can’t be completed because an unexpected error occurred (error code -50)

    I would get an external drive today and copy all your stuff off the TC.. forget trying to load more onto it. There is a good chance after 3years (A 2TB should be only about 2years tops), the disk or the TC itself is on the way out. Do it immediately. If TM is also failing to backup you need to recognise symtoms of impending doom.
    Unfortunately the error messages are archane and it is hard to discover their meaning.
    You also cannot verify a network drive.. you can verify the TM sparsebundle though so do that.
    A5. http://pondini.org/TM/Troubleshooting.html
    Reboot the whole network from off.. certainly if you run later OS it can simply lose the drive..
    If you still fail to be able to copy to the TC.. then get that external and copy off it. Tell us if you can do that.

Maybe you are looking for

  • Rs.get(index) vs. rs.get(columnName)

    I've been reading and learned that when we retrieve values from ResultSet, the first implementation in the following implementation will give us better performance (1) while(rs.next()) { int employeeId = rs.getInt(1); String firstName = rs.getString(

  • Blue scren when I plug in my iPod

    Hello I just got an brand new iPod touch for Christmas and everything was fine when I used/synced it/plugged/etc it until today. I plugged it with the provided USB cable and immediately after, I got the blue screen of death. I restarred my computer,

  • Why I cannot open in my Mac the documents of Pages open before in iPad after download the new version of this aPPLICATION?

    I bought the Page application. I download the new version in my Ipad. When i wish open a document in my Mac, if I have openned before in my Ipad, I can´t. I have download in my Mac the new version of the Lion´s mountain and the pages. In my Itunes ap

  • 8610e - can Ipad switch mono/colour before printing?

    Hi, HP 8610e printer and Ipad 2 When I print the only options available are to change the number of copies and single/double sided printing. It prints in colours and there is no option shown on the ipad for switching to mono. Is there a way to do it

  • Syncing Firefox across Mac and iPad mini 2

    Hi there, I do a *lot* of research and web browsing on my Mac Air with Firefox (google chrome seemed to consistently freeze my macbook air forcing me to hard restart). I currently have 2-3 windows with a good 30 tabs or so open on each. (I know, I kn