Cannot delete file: filename too long

Sometime ago, I made a copy of a hierarchy of folders under my "Users" folder to another drive as a quick backup. I no longer need this copy of folders and files. So when I tried to delete these files I got a message that some filenames are too long. When
I look at these files they mostly seem to be part of Internet Explorer temp directory, and also some files used by Mozilla Thunderbird, so they were likely created by these utilities on purpose. I cannot rename them to shorter names, or even move them to lower
folders. I can't even copy their filenames to show you what these filenames are! When I use the DOS prompt's "dir /x" command these files do not even have any 8.3 short filenames either, which I could've used to delete them with. There are over 400 of these
files!
I know what the problem is, the Windows OS has a limit of somewhere around 250 characters for filenames and complete pathnames. I've seen some utilities advertised saying that they can delete these files, but they all require money. Anything that's free?
Yousuf Khan

Hi,
It is just for testing. It is good since the files can be deleted in Linux.
However, if you don't have Linux, it needs to find the way to delete the files under Windows.
Since the files are located in Internet Explorer temp directory, you could use Disk Cleanup to clear the Temporary Internet Files.
Also, check if the following KB is helpful. It has several methods. Go to check if 8.3 name creation is disabled.
http://support.microsoft.com/default.aspx?scid=kb;en-us;320081
Best Regards,
L.S
Regarding it being in the Internet Explorer temp directory, it actually wasn't. Remember I said in the original posting that this was in a backup directory of these directories, so Disk Cleanup has no way of knowing that this belongs to Internet Explorer
or anything else. Also there was a Thunderbird directory having the same issues as well, which Disk Cleanup wouldn't have touched no matter what.
Okay, I checked out the state of the filesystem registry. The "NtfsDisable8dot3NameCreation" entry in the "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem" is set to non-zero, meaning the feature is in effect. Interestingly it was set to 2
rather than 1, but I doubt that makes a difference.
Even if I disable this feature right now, all previously created files still won't be assigned the 8.3 filenames, just only those files that are newly created will have the 8.3 filenames available.
Yousuf Khan

Similar Messages

  • File name too long cannot copy (cont'd)

    This is a continuation of the post started September 01, 2009, with the last post on
    October 17, 2011 named File name too long cannot copy
    Since this is an ongoing unsolved issue, and the thread was locked, it continues here.
    It is ever so easy to create a long file/path using explorer.exe as will be shown below.
    What needs to be solved is, what is an easy way (no, not by listing out all the files in a directory to a text file and counting characters), perhaps using a shell extension, to find out which files in a directory and it's subdirectories will be (or were)
    too long to copy, (and then perhaps even copying those over either intact or renamed)?
    Maflagulator said:
    I'm running the 7100 build...enjoying it except for one big thing:
    While attempting to copy 402gb from my main storage volume onto a spare 500gb drive (for the purpose of changing to a new RAID array) I've come across something that I would expect a Windows 98 OS to give me.
    It tells me that a file has TOO LONG of a file name, then provides with two unhelpful options: SKIP or CANCEL
    I never had XP give me an issue like this at all, so what gives? And while some specific files did have long file names (such as for songs, etc.) it had 7 issues with folders stating that their name was too long, but in fact they were not since they were
    titled '07-06-07' for the date that I dumped the audio files in them. However, they may have contained FILES with long file names though.
    Anyone else get this same situation? Perhaps the RTM version does not do this? Can anyone verify this regarding their install of the RC or the RTM?
    It made it through 400gb out of the 402gb transfer.
    I'm just happy to see that it doesn't spazz out about an issue like this until it has done all the other transfers that it can do because it saves the issues it has with files until the very end. In XP it would spazz about it the moment it came across it
    causing the transfer process to halt.
    Since long path/file names can so easily be created on Win7, it might be useful to see a typical way this happens, which might then give clues how to work with them.
    In Windows Vista, we learnt from:
    File names and file name extensions: frequently asked questions that:
    Windows usually limits file names to 260 characters. But the file name must actually be shorter than that, since the complete path (such as C:\Program Files\filename.txt) is included in this character count.
    In Windows 7, we are told here:
    File names and file name extensions: frequently asked questions that:
    It depends on the length of the complete path to the file (such as C:\Program Files\filename.txt). Windows limits a single path to 260 characters. This is why you might occasionally get an error when copying a file with a very long file name to a location
    that has a longer path than the file's original location.
    From the Windows Dev Center - Desktop, we read about Maximum Path Length Limitation here:
    Naming Files, Paths, and Namespaces
    This helps us understand why a folder can be a maximum of 244 characters, from the defined 260 length of MAX_PATH as follows:
    260 minus C:\ (3) minus <NUL> (1) = 256
    256 minus 8.3 file name (12) = 244
    We also learn there that: The Windows API has many functions that also have Unicode versions to permit an extended-length path for a maximum total path length of 32,767 characters.
    And we read the claim that: The shell and the file system have different requirements. It is possible to create a path with the Windows API that the shell user interface is not be able to interpret properly.
    There is also a comment below this document that reads: In a previous iteration of this document, it is mentioned that The Unicode versions of several functions permit a maximum path length of approximately 32,000 characters composed of components up to
    255 characters in length. This information is now gone.
    So we are in a position where the file system and Windows API can create long path/flies that the shell cannot handle.
    But then we need to be able to handle it, so a little exploration might lead to a better understanding of how to do this.
    For most tasks being performed on long folder/files, Windows 7 and other Windows programs balk when the Path+Filename length > 260
    Let's create a long path/file.
    Create a folder called A at the root of a Drive.
    Create a sub-folder of A called: B
    Create a sub-folder of B called: C
    Make a FILE in sub-folder C called (no spaces or break, one long continuous string): 123456789A123456789B123456789C123456789D123456789E123456789F123456789G123456789H123456789I123456789J 123456789K123456789L123456789M123456789N123456789O123456789P123456789Q123456789R123456789S123456789T
    123456789U123456789V123456789W123456789X123456.txt
    Rename sub-folder C to the string (no spaces or break, one long continuous string) (The actual directory created will be slightly shorter than this full length): 123456789A123456789B123456789C123456789D123456789E123456789F123456789G123456789H123456789I123456789J
    123456789K123456789L123456789M123456789N123456789O123456789P123456789Q123456789R123456789S123456789T 123456789U123456789V123456789W123456789X123456789Y123456789Z
    Rename sub-folder B to the same full string above. (The actual directory created will be slightly shorter than this full length but 2 characters longer than the step above.)
    Rename folder A to that same full original string. (Again the actual directory created will be slightly shorter than this full length but 2 characters longer than the step above.)
    You now have the lovely file placed at (the breaks are just so it fits into the screen):
    C:\123456789A123456789B123456789C123456789D123456789E123456789F123456789G123456789H123456789I123456789J 123456789K123456789L123456789M123456789N123456789O123456789P123456789Q123456789R123456789S123456789T 123456789U123456789V123456789W123456789X1234\ 123456789A123456789B123456789C123456789D123456789E123456789F123456789G123456789H123456789I123456789J
    123456789K123456789L123456789M123456789N123456789O123456789P123456789Q123456789R123456789S123456789T 123456789U123456789V123456789W123456789X12\ 123456789A123456789B123456789C123456789D123456789E123456789F123456789G123456789H123456789I123456789J 123456789K123456789L123456789M123456789N123456789O123456789P123456789Q123456789R123456789S123456789T
    123456789U123456789V123456789W123456789X\ 123456789A123456789B123456789C123456789D123456789E123456789F123456789G123456789H123456789I123456789J 123456789K123456789L123456789M123456789N123456789O123456789P123456789Q123456789R123456789S123456789T 123456789U123456789V123456789W123456789X123456.txt
    You have a folder length of over 700 and a file length of over 250 for a total of over 950
    However you will notice that each folder, when created, could only be a maximum of 247 charachters including the path (example C:\ , & C:\A , & C:\A\B
    This only applies backwards, that is up the path. It did not matter what was further down the path.
    Now, you can't easily access or rename the file, but you can rename the folders easily.
    For best results, start renaming from the top of the Tree, working down the subfolders, because renaming from down up will limit you, and in fact won't work if the folder lengths are too long.
    So how might knowing this help us?
    Well, to copy this long_file from the C:\ drive to the D:\ drive, and keeping the path structure, this should work:
    Note the name of the top folder. Rename it to something very short, say: A (Make sure C:\A does not exist)
    Note the name of the 2nd folder. Rename it to something very short, say: B (Make sure C:\A\B does not exist)
    Note the name of the 3rd folder. Rename it to something very short, say: C (Make sure C:\A\B\C does not exist)
    Make sure D:\A does not exist - then copy the A folder on disk C: to disk D: (which gives you D:\A\B\C\long_file
    Rename D:\A\B\C to D:\A\B\Original_3rd_Folder_name
    Rename D:\A\B to D:\A\B\Original_2nd_Folder_name
    Rename D:\A to D:\Original_top_Folder_name
    Rename C:\A\B\C back to their original names, in this same reverse order starting with C, then B, then A
    Note: If using Explorer, at some points you might have to press the F5 refresh key.
    This is of course how you might copy such long path/files without using the other more "easy" techniques for the "normal" everyday user like:
    sharing a sub-folder
    using the commandline to assign a drive letter by means of SUBST
    using AddConnectionunder VB to assign a drive letter to a path
    using the "\\?\" prefix to a path string to tell the Windows APIs to disable all string parsing and to send the string that follows it straight to the file system
    and so on.
    See how simple Windows can be for Dummies!
    But then, how can we know that files to be copied exceed this MAX_PATH? Or also after a copy has taken place, know exactly which files that have NOT been copied because of exceeding the MAX_PATH limit, and then a procedure to copy these either by renaming
    them, or by copying them intact as they are?
    There have been suggestions to use
    LongPathTool, but this does not have a facility to check a series of folders and tell you which files are going to be caught by the error when copying. So once a copy has taken place using Windows 7, one does not know which files did not get copied, and
    where exactly they are located.
    Neither does the free
    Old Path Scanner do that. It can only check for overly long directory paths, but misses out when the directory path is within limits, but adding in the file name puts it out of bounds.
    So, as shown above, it is ever so easy to create a long file/path using explorer.exe
    So, what then is an easy way (no, not by listing out all the files in a directory to a text file and counting characters), perhaps using a shell extension, to find out which files in a directory and it's subdirectories will be (or were) too long to copy,
    (and then perhaps even copying those over either intact or renamed)?

    This is a not a "solution" ....but a "work around": a low tech fix....for error message "your file name is too long to be copied, deleted, renamed, moved" :
    1.   problem is this: the "file name" has a limit on number of characters.....the sum of characters really includes the entire path name; you gotta shorten it first (i.e, if the total number of characters in the file name + Path name are over the
    limit, the error appears).  The deeper your file folder sub levels are, the more this problem will come up, especially when you copy to a subfolder of a subfolder/subfolder of another path ...adds to character limit)
    2.  How do you know which combined file names + path names are too long if  you are in the  middle of a copy operation and this error pops up?  Some files copied but the "long files error message" says "skip" or "cancel" ... but not which
    files are the "too long" ones.  If you hit "skip" or "cancel" the "too long" files are left behind...but are mixed in with non-offender "good" "short name" files.   Sorting thru 1000s of "good" files to find a few "bad" ones manually is impractical.
    3.   Here's how you sort out the "bad" from the "good":
    4.    Let's say you want to copy a folder ..."Football" ...that has five layers of subfolders; each subfolder contains numerous files:
      C:/1 Football / 2 teams/ 3 players/ 4 stats/ 5 injuriessidelineplayerstoolong 
           There are five levels root "1 football" with subfolders  2, 3, 4 and lastly "5 injuries"
    5.    Use "cut" and "paste"  (for example to backup all five levels to a new backup folder):
           select "1 football" ....cut....select target folder....paste 
           ("cut" command means as the files are copied to the target destination, the file is deleted from the source location)
          Hint: avoid "cut" and "paste" to a target folder that is itself a sub/sub/sub folder ...that compounds the "characters over the limit" problem ...because the characters in the sub/sub/sub folder are included in the "file name
    character limit"...instead "paste" to a C:/ root directory.
           Suppose in the middle of this operation...error pops up: "5 files have file names that are too long"  Skip or cancel?
           select "skip"  ...and let operation finish
    6.    Now go back and look at the source location: since the software allows only the "good" "short name" files to be copied (and because you "skipped" the "bad" "Long name" files so they are not copied or deleted) ...all that remains
    in the source location are the "bad" "long name files" (because "good" ones were deleted from the source location after the "cut" operation...the bad ones stick out like a sore thumb.
    7.   You will find ....all that remains in source folders are: the "bad" "too long" files; in this example the "bad" file is in level 5:
          C:/ 1 football / 2 teams /3 players /4 stats /5 injuriessidelineplayerstoolong
    8.   select folder 5 injuriessidelineplayerstoolong (that's right...select folder, not file) gotta rename the folder first.
    9.  hit F2 rename folder..folder name highlighted...delete some of the letters in the folder name:
           like this:   5 injuriessidelineplayers  ....you should delete 'toolong'....from the folder name
    10.  then go into folder 5....and do the same operation ...with the too long file name:
            hit F2 rename file....file name hightlighted...delete some of the letters
               like this:  injuriessidelineplayers.....you should delete 'toolong' from the file name
    11.  Now..."cut and paste"  the renamed file to the target backup folder.  
    The Error message will pop up again if you missed any "bad" files....for example, it will indicate "5 files too long" ....then repeat process 5 times until you fix all of them
    12.     Finally, copy the target destination files back to the source location (when you are certain all source location file folder locations are empty) 
    Of course, this "makeshift" solution would not be necessary if MSFT would fix the problem...

  • Receiving ERROR meassage when trying to copy..file name too long.

    Hello.
    There is an error code number, but didn't write it down...will do so, if no-one can answer this question at the minute. I am not at the Mac at the moment, so this post is pre-emptive.
    Problem:
    If I try to copy over a folder with photoshop images onto another drive, the copy is incomplete due to the name/s of the files being too long, apparently.
    The error message says something to the effect: 'the names are too long can't complete copy'.
    The file names are about 10-12 [at most]characters in length.
    Please advise
    Chris

    If the drive is formatted HFS then you are limited to 32 characters on a file name. If it is formatted HFS + then you can have file names as long as 255 characters. I am not familiar withi the format you say the drive is formatted in so I can't speak to it.
    If you are receiving -50 errors that can indicate a file name that is too long OR an illegal character in the filename regardless of its length.
    If you are actually using 10.3.8 as your profile states then that may be part of the problem. Many of these problems existed in 10.3.X but were fixed in 10.4
    I remember that 10.3.8 had issues copying to external drives when there were more than a certain number of characters in a filename. I don't remember the number but for some reason 10 or 12 is what comes to mind. It caused me many problems when I would try and copy files to a Zip disk that I used to have. Since I updated to 10.4 those issues have never occured again.
    Since you know what folder the problematic files are in why not just open the folder and try to copy files one at a time. When you get to the one(s) that is a problem, change the file name to something shorter.
    A better solution would be to update to 10.4 but with 10.5 coming out sometime in the Spring of 2007 this may not be the time.

  • Cannot delete file Windows2Local/Components/{multiple}.settings

    Every time I shutdown JSE it shows a couple of ugly messages saying:
    "Cannot delete file Windows2Local/Components/classes.settings in C:\Documents and Settings\Joost\.jstudio\Ent8\config"
    "Cannot delete file Windows2Local/Components/sources.settings in C:\Documents and Settings\Joost\.jstudio\Ent8\config"
    "Cannot delete file Windows2Local/Components/watches.settings in C:\Documents and Settings\Joost\.jstudio\Ent8\config"
    "Cannot delete file Windows2Local/Components/properties.settings in C:\Documents and Settings\Joost\.jstudio\Ent8\config"
    "Cannot delete file Windows2Local/Components/designpattern.settings in C:\Documents and Settings\Joost\.jstudio\Ent8\config"
    "Cannot delete file Windows2Local/Components/threads.settings in C:\Documents and Settings\Joost\.jstudio\Ent8\config"
    Assuming that JSE had some problems to access my profile (oh, how I *hate* Windows...) I wanted to change the JSE working directory to C:\Projects\Java Studio Enterprise, but I can't find the place within the Tools|Options where I can set that. Help!
    Regards,
    Joost

    Thanks for the reply. I added the -userdir option, and now it complains:
    "Cannot delete file Windows2Local/Components/ComponentPalette.settings" in C:\Projects\Java Studio Enterprise\config"
    "Cannot delete file Windows2Local/Components/CollaborationExplorer.settings" in C:\Projects\Java Studio Enterprise\config"
    Hmmm, it seems to me that - although the number of error messages has been reduced - JSE is still not very happy about something. It would be nice if it was a bit more precise in its problem description.
    Regards,
    Joost

  • Cannot delete files from my ipod shuffle!!!

    I am new to using an ipod and i cannot delete files from my ipod, on itunes, it only shows the license agreement where the ipod files are supposed to be and no matter how many times i uninstall and reinstall itunes and agree to the license agreement i can't access anything else. can anyone help me at all i feel like a complete idiot!

    Pressing return will get past this screen as there is a button at the bottom right of iTunes which you likely cannot see.
    Set your screen resolution to at least 1024x768 to see this button.

  • How can I download a 18 minute video I recorded from my iPad to either email or youtube or vimeo I keep getting the message the file is too long.

    How can I transfer a 18 minute video I recorded on my iPad camera app to email/youtube or vimeo? I keep getting the message the file is too long do want to send clips?
    Thanks

    Youtube usually had an 8 minute length cap, which may be part of your issue. Also at 18 minutes that is probably a gig+ file size, which will also take a long time to upload and may be another part of the issue.
    Edit it down as jim suggested. Or you may need to use something like dropbox, to get it off your ipad and onto a computer where might have more options to edit it down or size it down.
    If it's just file size you can transcode it into a smaller file - a lower quality MP4 for example. If it's the length that's an issue for youtube, you'll need to break it up into a couple different files and upload part 1 and part 2

  • File path too long when collecting??...

    Hi all,
    REALLY hope someone has some wisdom on this! I've searched forums and the web and not yet found an answer....
    I've got a MASSIVE project on an external drive that's on the way out, so I want to collect the project that's on it to another new healthy drive. The current file structure leaves alot to be desired (several years of updating the same project and splitting it into managable portions then importing them back together several times, files still on there that aren't in use in AE anymore but have been kept 'incase we need them again later', etc...you can imagine the mess!)
    SO, I'm getting the 'file path too long' error when trying to collect it. Now, I could manually go through every folder and sub folder and tidy things up within AE - this would days about a week I reckon! - but I'll do it if that's the only way. What I'm wondering is this: -
    A) is the problem AE is having with the deep structure *WITHIN* ae project, or with the actual folders/files on the disk itself?
    B) if I tidy it up in AE only will that fix it?
    C) is there an easier way to do this rather than manually going through everything and looking for the offenders???
    Thanks guys,
    Jim.

    GULP....so I have to reorganise my assets OUTSIDE of AE and then relink it all WITHIN AE afterwards?? With 3 x 430GB projects and thousands of assets that is going to take a looooooooonng time.
    What I don't understand (or like) is how AE will let you get this far without any warning and still operate/save, etc but then when you come to collect is goes 'urr urrrr, computer says no'.
    Is there really no way of automating some of this then? I mean even a script that highlighted items in the project that are over the maximum path length would save a hell of a lot of manual searching and counting.
    Thanks for your replies guys but.....AAAARRGGHH!!!!!

  • Disk Utility (10.5.6) error: File name too long

    Hello, here is one for you all...
    I am in the midst of creating a new "build image" so I can start deploying Leopard.
    Before I upgraded the build to 10.5.6 I was able to create a disk image of this build machine.
    After updating it to 10.5.6 and all of the current Apple updates I am no long able to create a disk image.
    I keep getting an error several minutes into the imaging process that says +"*File name too long".*+
    I've run permission repair on the disk and Disk Warrior with still no luck. I've also used different machines and a boot FireWire drive to make he image and still have had no luck. I can use CCC to clone my Master build to another machine but I need to be able to make an image of it.
    Thanks in advance for any help.

    Bear in mind that in Unix, a file name includes the path, so if you have a very deep file or perhaps some kind of infinite recursive link, that might cause the problem, since that would make the file name very long indeed.
    This may not be the problem you are having, but it just came to my mind when I read your post

  • "Maximum number of application files exceeded or file names too long"...help!!!

    Hi there…
    I am trying to create a game for my mobile.
    The “problem” is that I have more than 500 swfs that I want to pack using the Adobe Mobile Packager. And I am getting this error:
    “Maximum number of application files exceeded or file names too long”
    How could I solve this problem?
    Thanks everyone!
    Cheers.
    Leo.

    500??  What are there so many files?
    The problem is that the CAB format only allows for 300 files maximum, so there's nothing that we can do about that I'm afraid.
    Mark
    www.flashmobileblog.com

  • JAXB: Error compiling classes generated by xjc (file name too long)

    Hi friends,
    I am trying to compile classes that are generated by using XJC tool on xsd file. The compilation fails with following message.
    buildxsdmodel:
        [javac] Compiling 794 source files to /home/uchamad/working/teleworker/ejb/build/classes
        [javac] /home/uchamad/working/teleworker/ejb/build/tmpsrc/uk/co/novatel/teleworker/model/wlr/bulksearch
    results/impl/ApplicationInformationTypeImpl.java:58372: error while writing
    uk.co.novatel.teleworker.model.wlr.bulksearchresults.impl.ApplicationInformationTypeImpl.XMLRequestID
    TypeImpl.SearchOrderResultsTypeImpl.SearchTypeDetailTypeImpl.OrderTypeImpl.OrderDetailsTypeImpl.
    OrderLinesTypeImpl.NumberPortingTypeImpl.OLODetailsTypeImpl.NumberLocationTypeImpl.OLOMainP
    STN1AddressTypeImpl.Unmarshaller: /home/uchamad/working/teleworker/ejb/build/classes/uk/co/novatel
    /teleworker/model/wlr/bulksearchresults/impl/ApplicationInformationTypeImpl$XMLRequestIDTypeImpl$S
    earchOrderResultsTypeImpl$SearchTypeDetailTypeImpl$OrderTypeImpl$OrderDetailsTypeImpl$OrderLin
    esTypeImpl$NumberPortingTypeImpl$OLODetailsTypeImpl$NumberLocationTypeImpl$OLOMainPSTN1A
    ddressTypeImpl$Unmarshaller.class (File name too long)
        [javac]                                             public class Unmarshaller
        [javac]                                                    ^
        [javac] 1 error
    The compiler is complaining about the file name being too long. This is happening because the java classes when generated from XSD contains deep nesting of inner classes. So when it comes to compile the .class name file is too long for the operating system.
    I am trying this on unix box.
    I wonder if there is a way to configure XJC so that it does not produce inner classes but instead keep them out.
    Any help would be appreciated.
    many thanks
    Usmangani

    Flattening your schema definition will flatten the output files, too -- that will probably be nice for coding as well since you wont have to use class names such as SomeTypeNestedInAnotherTypeThatHasYetAnotherType. Instead of having all of the elements defined directly within the enclosing root element, define logical chunks at the top level and incorporate them in the definition of real root element of your documents by reference.

  • Admin suddenly cannot delete files without entering password?

    Admin (and sole user) suddenly cannot delete files without entering password?

    Admin (and sole user) suddenly cannot delete files without entering password?

  • Importing iTunes library from a Mac to PC--File name too long error.....

    Hi...
    Hope someone can help. Ive been forced to use a PC at work (Win7) and am trying to install my 84 gig library from my Macbook Pro to the PC. During the course of the import, i get an error stating that a file is too long, and then the whole process aborts....any suggestions?
    thanks in advance!
    yp

    Log into the migrated account, find the content, choose Go to Folder from the Finder's Go menu, provide /Users/Shared/ as the path, drag it there, and access it from the new account.
    (100256)

  • Cannot delete file from external hard drive (error code 36) in Finder, but Terminal is ok

    I have a relatively new Macbook Pro Retina 15" and have a Western Digital 1 TB Passport.  I've been using the passport for about a year now without any problems on older Macbooks in my house.  I used to be able to read and write to this drive no problem.  I am using the Paragon NTFS for Mac software in order to read and write to the NTFS drive.  When I navigate through the drive in Finder, if I try to create a new folder, I do not have a problem.  If I try to delete that folder I just created, I get this error:
    The Finder can’t complete the operation because some data in “untitled folder” can’t be read or written.
    (Error code -36)
    The folder has nothing in it whatsoever.  I just created it.  But if I go to Terminal and I run
    rm -rf "untitled folder"
    This works fine.  Why is Terminal acting different than Finder?  This does not happen on my other Macbooks.  Thanks in advance.

    Thanx for such qucik reply!!! The pages were great, it had an answer for my problem, but unfortunately it also involved me dealing with it only on the MacIntosh HD itself, not on mounted external drive I suppose... So it didn't work they say that there is an icon in the left corner indicating locked folder - I don't see any icon on it. It says you can untick the box to unlock the folder - there is no tick to be unticked. Finally, they say that if I don't have permition or rights I cannot delete it. But how do i change permittion which already says that i can read and write in it? So everything appears to be normal only I cannot delete it. there is not even any warnig telling me I don't have enough rights, it just requires the password and after me typing it in it makes the sound of scraping paper but does nothing more. I aslo had some problems with emptying Trash after being seemingly succesful with one file and had got so far to have them appear in the Trash (no clue how this one actully got there though..) I followd the advice and emptied the Trash with Terminal. The Folder is still there but it shows 0 Kb... So far so good BUT: It is still on the external drive, so I obviously only managed to copy it into the Trash!!! Phew, innit a bit too tight to poor owners, this macbook?? I want my rights back!

  • Re: Satellite L450D Cannot delete file from desktop

    Hi all, I was veiwing some photos on yahoo email via firefox version 3 6 3 sent by my sister in Australia, when this file appeared on my desktop which I cannot delete.
    The file is called Pez & Lisa (after my sister and brother in laws photograph) when i try to delete it I get the message "COULD NOT FIND THIS ITEM, THIS IS NO LONGER LOCATED IN C/USERS/PAUL/DESKTOP VERIFY THE ITEMS LOCATION AND TRY AGAIN"
    The file when I right click on proprties reads the file is 0 bytes size.
    It cannot be deleted in safe mode or moved or renamed or anything!
    Any ideas??

    Hi Guys, thanks for your replies, however, there is nothing in startup or task manager to delete!
    I have tried downloading unlocker, but it doesnt do anything when I click on it!! Maybe it doesnt work with Windows 7.
    I suppose I can leave it alone as its not doing anything! its not worth a reformat just do get rid of an icon.
    Ho Hum.

  • Cannot delete file ...bug?

    This appears like a bug to me...see if you agree.
    A file opened for read-only access and memory mapped using the map method of FileChannel cannot be deleted even when the channel is closed. An example of this is the simple Grep.java example from NIO modified only to try and delete the file. On Win2K, the delete fails. Once the channel is closed, it should be able to delete the file. Is this a bug?
    import java.io.*;
    import java.nio.*;
    import java.nio.channels.*;
    import java.nio.charset.*;
    import java.util.regex.*; public class Grep {     // Charset and decoder for ISO-8859-15
    private static Charset charset = Charset.forName("ISO-8859-15");
    private static CharsetDecoder decoder = charset.newDecoder(); // Pattern used to parse lines
    private static Pattern linePattern
    = Pattern.compile(".*\r?\n"); // The input pattern that we're looking for
    private static Pattern pattern; // Compile the pattern from the command line
    private static void compile(String pat) {
    try {
    pattern = Pattern.compile(pat);
    } catch (PatternSyntaxException x) {
    System.err.println(x.getMessage());
    System.exit(1);
    } // Use the linePattern to break the given CharBuffer into lines, applying
    // the input pattern to each line to see if we have a match
    private static void grep(File f, CharBuffer cb) {
    Matcher lm = linePattern.matcher(cb);// Line matcher
    Matcher pm = null;// Pattern matcher
    int lines = 0;
    while (lm.find()) {
    lines++;
    CharSequence cs = lm.group(); // The current line
    if (pm == null)
    pm = pattern.matcher(cs);
    else
    pm.reset(cs);
    if (pm.find())
    System.out.print(f + ":" + lines + ":" + cs);
    if (lm.end() == cb.limit())
    break;
    } // Search for occurrences of the input pattern in the given file
    private static void grep(File f) throws IOException { // Open the file and then get a channel from the stream
    FileInputStream fis = new FileInputStream(f);
    FileChannel fc = fis.getChannel(); // Get the file's size and then map it into memory
    int sz = (int)fc.size();
    MappedByteBuffer bb = fc.map(FileChannel.MapMode.READ_ONLY, 0, sz); // Decode the file into a char buffer
    CharBuffer cb = decoder.decode(bb); // Perform the search
    grep(f, cb); // Close the channel and the stream
    fc.close();
    // Try deleting the file =================================
    boolean deleted = f.delete();
    if (!(deleted)) {
    System.err.println("Could not delete file " + f.getName());
    System.exit(4);
    // End try deleting file =================================
    } public static void main(String[] args) {
    if (args.length < 2) {
    System.err.println("Usage: java Grep pattern file...");
    return;
    compile(args[0]);
    for (int i = 1; i < args.length; i++) {
    File f = new File(args);
    try {
    grep(f);
    } catch (IOException x) {
    System.err.println(f + ": " + x);

    Here is the minimal code that demonstrates this. It opens the file specified on the command line, maps it to memory, prints it out, and then tries to delete the file.
    There is no question about calling close on a File object. The close method is invoked on a stream or a channel. In the case of a channel, it should automatically close the stream. However, in this code I am closing the stream and the channel.
    import java.io.*;
    import java.nio.*;
    import java.nio.channels.*;
    import java.nio.charset.*;
    public class testFileDelete {
    public static void main(String[] args) {
              FileInputStream fis = null;
              if (args.length < 1) {
                   System.err.println("Usage: java testFileDelete <filename>");
                   System.exit(1);
              File f = new File(args[0]);
    try {
                   // Open the file
                   fis = new FileInputStream(f);
              } catch (FileNotFoundException ex) {
                   System.err.println("Error! " + ex.getMessage());
                   System.exit(2);
              try {
                   // Get a channel from the stream
                   FileChannel fc = fis.getChannel();
                   // Map the file into memory
                   MappedByteBuffer bb = fc.map(FileChannel.MapMode.READ_ONLY, 0, (int)fc.size());
                   // Do something interesting here. For this example, just print the
                   // contents of the file.
                   // Decode the file into a char buffer, so we can print the contents.
                   Charset cs = Charset.forName("8859_1");
                   CharsetDecoder cd = cs.newDecoder();
                   CharBuffer cb = cd.decode(bb);
                   // Now print it out to standard output
              System.out.print(cb);
                   // Close the channel and the stream
                   fc.close();
                   // Close the input stream even though closing the
                   // channel should do this
                   fis.close();
              } catch (IOException ex) {
                   System.err.println("Error! " + ex.getMessage());
                   System.exit(3);
              // Done processing file. Now delete it.
              boolean deleted = f.delete();
              if (!(deleted)) {
                   System.err.println("Could not delete file " + f.getName());
                   System.exit(2);

Maybe you are looking for