Results 1 to 7 of 7

Thread: can't delete folder

  1. #1
    Join Date
    Jun 2008
    Location
    NZ
    Posts
    1,546

    Default can't delete folder

    Trying to delete a folder that was created when extracting a zip archive.
    When I right click and select "move to trash" an error message pops up and says "The file or folder . . . . does not exist"

    I know it exists because I can see it and am trying to delete it.
    Tried logging in as root and deleting it and got the same message.
    Extracted the zip archive to another location and tried deleting that one and get exactly the same message. Now I have two instances of a folder I can't delete.

    Any ideas on what I can do to delete this folder?

  2. #2
    Join Date
    Mar 2008
    Location
    Oz
    Posts
    11,727
    Blog Entries
    2

    Default Re: can't delete folder

    Try emptying the trash can first. There's a limit on how much trash you can have in the can.

    Then if it's a file you want to delete run this command: rm /path_to/filename
    Or if it's a folder then run this instead: rm -Rf /path_to/folder_name

    Be very careful with the second one, it's recursive (meaning it will delete all the subdirectories too, so don't make a typo).
    Leap 42.3 & 15.1(Beta) &KDE
    FYIs from the days of yore

  3. #3
    Join Date
    Jun 2008
    Location
    NZ
    Posts
    1,546

    Default Re: can't delete folder

    trash is empty.

    Using your command I get the error

    Code:
    bash: syntax error near unexpected token `('
    this is the name of the folder I am trying to delete

    (ALBUM) ����� (2005.11.23) - Ken Hirai 10th Anniversary Complete Single Collection �f95-�f05 ���o�J (192k)

    the folder appears to be empty

  4. #4
    Join Date
    Nov 2009
    Location
    West Virginia Sector 13
    Posts
    15,649

    Default Re: can't delete folder

    That is a weird file name lots of unusual characters.

    try putting the name in quotes. ie

    rm -r ./"(ALBUM) ����� (2005.11.23) - Ken Hirai 10th Anniversary Complete Single Collection �f95-�f05 ���o�J (192k)"

    you would need to be in the directory that contains this directory.

    You also may try auto completion because of the apparent untypable characters.

    type
    rm -r ./"(A
    then press tab see if the shell will complete the name then press "
    might work

  5. #5
    Join Date
    Jun 2008
    Location
    NZ
    Posts
    1,546

    Default Re: can't delete folder

    Quote Originally Posted by gogalthorp View Post

    You also may try auto completion because of the apparent untypable characters.

    type
    rm -r ./"(A
    then press tab see if the shell will complete the name then press "
    might work
    Excellent - that worked - thank you very much.

    File name contains Japanese characters. The original zip files I can view the Japanese characters fine but when unzipped everything goes wrong.
    No idea with the problem is there - never come across this before.

  6. #6

    Default Re: can't delete folder

    OK, I have the same problem. The Auto complete did not solve the problem. I get "cannot remove ... no such file or directory"

    Might there be an other solution? tried logging in as user, as root, tried to delete from dolphin (as user and as root) tried to delete from terminal with rm (as user and as root)

    is there an other option? the stupid file is 1.3GB, would like to get rid of it..

    Is there a way to delete from outside Suse (Suse 11.1, KDE3)?

    Thx 4 your help!

  7. #7
    Join Date
    Jun 2008
    Location
    Berlin
    Posts
    2,061

    Default Re: can't delete folder

    Well, actually you two do not want to remove the extracted folder but keep it, right? You might try a handy too called 'convmv' (available via 'OSS'), which will convert the folder / its content to the correct encoding.

    Code:
    convmv -f ISO-8859-1 -t UTF-8 -r someFolder*
    ...will not convert the folder yet but do a test first. When the output seems okay, do

    Code:
    convmv -f ISO-8859-1 -t UTF-8 -r --notest someFolder*
    Note that it works with wildcards, too (so does 'rm').

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •