8 Replies Latest reply: Jan 25, 2013 7:32 AM by 74fiat
AMCarter3 Level 1 Level 1 (10 points)

I have some very old files on my laptop that I cannot delete. The file type is: Unix Executable File.  They are leftover files from some obsolete graphics software I was using back in the early '90's (not system related or anything related to current software).  When I attempt to trash these files, I get error msg: The operation can’t be completed because an unexpected error occurred (error code -1407).

 

Any suggestions on another way to delete them or a tool for doing it?


MacBook Pro 2.4 GHz Intel Core 2 Duo, Mac OS X (10.6.8)
  • X423424X Level 6 Level 6 (14,205 points)

    Maybe these articles will help:


    You can't empty the Trash or move a file to the Trash

    The X Lab: Solving Trash Problems

     

    You might also consider using a utility like TrashIt.

     

    FWIW, error -1407 is corresponds to "Expected a folder, got a file".  You may want to consider running Disk Utility to repair/verify your drive(s).

  • HACKINT0SH Level 5 Level 5 (5,755 points)

    I have seen this error code multiple times before. Here's your solution:

     

    1. Force quit the Finder.
    2. Click the Relaunch button.
    3. Click Relaunch again.
  • fane_j Level 4 Level 4 (3,660 points)

    AMCarter3 wrote:

     

    I have some very old files on my laptop that I cannot delete. The file type is: Unix Executable File.

    The type is bogus. It's what Finder says when the file has no filename extension, nor file type signature.

    When I attempt to trash these files, I get error msg: The operation can’t be completed because an unexpected error occurred (error code -1407).

    The error is "Expected a folder, got a file". Possibly bogus too.

     

    The simplest way to get rid of them (if they're not too many) is in Terminal. Here's a short description of Terminal

     

    <http://guides.macrumors.com/Terminal>

     

    To delete one of your files, in Terminal, at your prompt, type

     

    rm -fR

     

    (that's "rm<blank_space><hyphen>fR<blank_space>")

     

    Then drag the file on the Terminal window. Its path should be inserted on the command line. (Make sure it's the right file. The rm command is not undoable.) Finally, press Return to execute the command. The file should be deleted whatever it is. If there's an error, copy the message text and paste it here.

  • AMCarter3 Level 1 Level 1 (10 points)

    I was finally able to trash all of the files. However, Secure Delete did NOT do it. Checking permissions did NOT do it. Unlocking the file did NOT do it. Running Disk Utilities was something I had already tried - it did not help. I even tried using the Terminal RM (remove) function and that did NOT work. Pesky little buggers.

     

    BUT, I did get an idea from everyone's suggestions. I was finally able to send them to the trash and delete them by adding a suffix to each file... like *.txt* or *.doc*... and then deleting the suffix. That worked. I could then trash the files and empty the trash.

     

    Thanks for the input.

  • HACKINT0SH Level 5 Level 5 (5,755 points)

    That solution is interesting, I"m just not sure if it was a false-positive though.

  • HeyHeresAUserName Level 1 Level 1 (0 points)

    Hi,
    I'm having a similar problem.  I can't delete a damanaged file (in this case a jpg). I"m trying to backup my my external drive and I get an error: "The problem may be temporary. Try again later to back up. If the problem persists, use Disk Utility to repair your backup disk.Latest successful backup: 8/18/12 at 2:21 PM"

     

    So I ran Disk Utility on all draives no problem.  Then I ran Time Machine buddy and found the offending files (three 3 jpgs that won't open).  When I try to move these to the trash, I get this error: The operation can’t be completed because an unexpected error occurred (error code -1407).

     

    When I tried to dete the files using fane_J's recommendation using Terminal I get this error:

    rm: illegal option -- /

    usage: rm [-f | -i] [-dPRrvW] file ...

           unlink file

     

    Any ideas?

  • HeyHeresAUserName Level 1 Level 1 (0 points)

    Hi,
    I'm having a similar problem.  I can't delete a damanaged file (in this case a jpg). I"m trying to backup my my external drive and I get an error: "The problem may be temporary. Try again later to back up. If the problem persists, use Disk Utility to repair your backup disk.Latest successful backup: 8/18/12 at 2:21 PM"

     

    So I ran Disk Utility on all draives no problem.  Then I ran Time Machine buddy and found the offending files (three 3 jpgs that won't open).  When I try to move these to the trash, I get this error: The operation can’t be completed because an unexpected error occurred (error code -1407).

     

    When I tried to dete the files using fane_J's recommendation using Terminal I get this error:

    rm: illegal option -- /

    usage: rm [-f | -i] [-dPRrvW] file ...

           unlink file

     

    Any ideas?

  • 74fiat Level 1 Level 1 (0 points)

    As AMCarter3 mentioned, rename the file by adding .doc

    At this point I was able to open my Unix file as script.

    I simply deleted some of the script, moved the file to trash and was able to empty the trash completely.