Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

CANNOT DELETE FILES (.db and .ini files)

i moved files from my dell to my new mac. my computer is now loaded with files like "thumbs.db" and "desktop.ini"

do i need these on a mac? why will they not move into the trash folder?

i cant get them into the trash folder at all.
i have tried to unlock them through file info and that does not work.

MACBOOKPRO, Mac OS X (10.5.6)

Posted on Dec 28, 2008 9:00 PM

Reply
21 replies

Dec 28, 2008 10:54 PM in response to stronghold79

You probably don't need the .ini files, but some Mac programs do use "thumbs.db" (like some photo organizing programs), so you should just move those to a temporary folder while testing out your programs.

WARNING You will not be able to retrieve your files if you do the following. BACK UP YOUR DATA!

To remove stubborn files, you'll need an administrator account and password. Using Terminal, issue this command:

sudo rm -rf /path/to/filename



Hit Return. It will ask you for an admin password; type it in, and hit Return.

If you do not know what the correct path to the file is, just type up to +rm -rf+ then drag the file or folder onto the Terminal window. Mac OS will fill the path for you.

Dec 28, 2008 11:19 PM in response to stronghold79

ok, wait, i think im following you now...

you say i can just type up to rm -rf then drag the file or folder onto the Terminal window, right? i have hundreds of these sort of files. can i select them all at once and move them all at once into the terminal window? and ive read something about needing correct spacing when doing this as to not erase my harddrive?!?! any thoughts?

Dec 28, 2008 11:34 PM in response to stronghold79

stronghold79 wrote:
ok, wait, i think im following you now...

you say i can just type up to rm -rf then drag the file or folder onto the Terminal window, right? i have hundreds of these sort of files. can i select them all at once and move them all at once into the terminal window? and ive read something about needing correct spacing when doing this as to not erase my harddrive?!?! any thoughts?



Why not create a folder on the desktop and drag all the files into it. Then drag that folder onto the terminal window after typing 'sudo rm -rf '?

The rm command is indeed very powerful, and could erase many very important files when used with the sudo command. Just be aware of this when using it, and drop the files to be deleted onto the terminal window, that way the path will always be correct. There should be a space after the 'sudo rm -rf' bit of the command and the path to_thefile bit that's all. If you don't get a space in there it will complain about illegal use and do nothing, if you put too many spaces in there it will work correctly... you just need a space.

Dec 28, 2008 11:50 PM in response to Nick King

great idea Nick, but when i try to move the files to a folder they dont just move, they copy to the folder, leaving the original where it was. very strange!!!

that is, the files i want to delete are buried in various places in my pictures folder. when i attempt to move them to a folder i created on the desktop to it copies to that folder, not just a move.

strange...hard drive is not partitioned!

Dec 29, 2008 12:19 AM in response to gsr1379

That'll be it... NTFS!

Unfortunately I don't think there's a quick way to do this, but you need to unlock the files first.

You will need to do the following command to each file that you need to delete, before you can try to move or delete it. The command is 'sudo chflags -R nouchg ' then drag the file onto the terminal window as before and enter your admin password.

You should then be able to delete the files... maybe even just by putting them in the trash.

Dec 29, 2008 12:31 AM in response to stronghold79

so...the best solution we have right now is to manually move each file that i want to delete into the terminal widow along with the unlocking syntax Nick gave me. then hope from there i can move the files to the trash and simply delete them...

if not, after i unlock these 200 files or so, then ill have to go back to the terminal window, write in the force deleting syntax we talked about earlier and manually move each file (once again) into the terminal window?!?!?!?!

n a side note, is it just me, or is this getting ridiculous? i thought switiching was going to be easy.

Dec 29, 2008 12:49 AM in response to stronghold79

Well there are a number of solutions out there that I found with a little perseverance and Google 😉

Assuming all the offending files are in your Pictures folder, then the following command will remove the flag from all the files in your pictures folder.

sudo chflags -R nouchg ~/Pictures

This will then enable you to move them all into one folder and just delete that one folder... from the trash.

CANNOT DELETE FILES (.db and .ini files)

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.