maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   General (https://talk.maemo.org/forumdisplay.php?f=7)
-   -   need help to delete 'desktop.ini' files (https://talk.maemo.org/showthread.php?t=47483)

rokafellaskank 2010-03-16 01:09

need help to delete 'desktop.ini' files
 
hello. i'm using the n900. i downloaded a file into MyDocs/Downloads and after unziping it i found desktop.ini files in some of the folders. when i came to delete the folders and the contents, i was told that i couldn't delete because they are read only. if anyone knows how to delete these, could you please give me a step by step guide please because i've only had the phone for a week. thanks.

matze 2010-03-16 01:21

Re: need help to delete 'desktop.ini' files
 
Connect the N900 to your desktop machine in mass storage mode and then try to delete the folders. I don't know your OS, but you probably have to go into the folder properties at first and disable "read only".
This might be the easiest way without using xterm.

rokafellaskank 2010-03-16 01:47

Re: need help to delete 'desktop.ini' files
 
Quote:

Originally Posted by matze (Post 568659)
Connect the N900 to your desktop machine in mass storage mode and then try to delete the folders. I don't know your OS, but you probably have to go into the folder properties at first and disable "read only".
This might be the easiest way without using xterm.


hi matze, thanks for the quick response. i havn't got a pc. if you could give me a run through on how to do it in xterm, that'd be great.
thanks

lfcobra 2010-03-16 02:22

Re: need help to delete 'desktop.ini' files
 
As with running any terminal commands you should fully understand what you are doing before preceding.

open xterm and type:
Code:

cd MyDocs/Downloads/NameOfExtractedFolder
for i in `find . | grep desktop.ini`; do rm -i "$i"; done

The first line will change directories into the extracted folder directory.
The second line will search all subdirectories for desktop.ini and then ask you if you want to delete it.

That should work. If you have any issues report back.

rokafellaskank 2010-03-16 03:16

Re: need help to delete 'desktop.ini' files
 
Quote:

Originally Posted by lfcobra (Post 568689)
As with running any terminal commands you should fully understand what you are doing before preceding.

open xterm and type:
Code:

cd MyDocs/Downloads/NameOfExtractedFolder
for i in `find . | grep desktop.ini`; do rm -i "$i"; done

The first line will change directories into the extracted folder directory.
The second line will search all subdirectories for desktop.ini and then ask you if you want to delete it.

That should work. If you have any issues report back.


$ ~ $ cd MyDocs/Downloads/Folder/Q/Mazda [Mx5]
-sh: /home/user: Permission denied
~ $

lfcobra 2010-03-16 03:28

Re: need help to delete 'desktop.ini' files
 
Quote:

Originally Posted by rokafellaskank (Post 568721)
~ $ cd MyDocs/Downloads/Folder/Q/Mazda (Mx5)
-sh: syntax error: "(" unexpected

it wont read the bracket, and it wont let me rename the folder in file manager.

type:
cd MyDocs/Downloads/Folder/Q/Maz
and then press the Tab button on the touch screen to autocomplete the folder name, and then press enter to actually execute the command.

edit:
actually you could just type
cd MyDocs/Downloads/Folder

The code in my previous post will look in ALL subdirectories of "Folder" so its really not necessary to go any deeper.

rokafellaskank 2010-03-16 08:30

Re: need help to delete 'desktop.ini' files
 
~ $ cd MyDocs/Downloads/Folder/Q
~/MyDocs/Downloads/Folder/Q $ for i in `find . | grep desktop.ini`; do rm -i "$i"; done
~/MyDocs/Downloads/Folder/Q $


nothing happened

i had to type all the folder names because if i didn't it just didn't find the folder.

BigLebowski 2010-03-16 08:45

Re: need help to delete 'desktop.ini' files
 
~ $ cd MyDocs/Downloads/Folder/
~ $ find . -name desktop.ini -exec rm -i {} \;

HTH

rokafellaskank 2010-03-16 09:23

Re: need help to delete 'desktop.ini' files
 
Quote:

Originally Posted by BigLebowski (Post 568843)
~ $ cd MyDocs/Downloads/Folder/
~ $ find . -name desktop.ini -exec rm -i {} \;

HTH




BusyBox v1.10.2 (Debian 3:1.10.2.legal-1osso26+0m5) built-in shell (ash)
Enter 'help' for a list of built-in commands.

~ $ cd MyDocs/Downloads/Folder/Q
~/MyDocs/Downloads/Folder/Q $ find . -name desktop.ini -exec rm -i {} \;
find: unrecognized: -exec
BusyBox v1.10.2 (Debian 3:1.10.2.legal-1osso26+0m5) multi-call binary

Usage: find [PATH...] [EXPRESSION]

~/MyDocs/Downloads/Folder/Q $


still nothing :(

BigLebowski 2010-03-16 10:19

Re: need help to delete 'desktop.ini' files
 
BusyBox :(

rokafellaskank 2010-03-16 11:42

Re: need help to delete 'desktop.ini' files
 
what is the 'BusyBox'?

is that whats stopping me from deleting the files, if so, is there any way to change it?
i'm sorry for being such a pain in the arse, but i am desperate.

Patola 2010-03-16 12:00

Re: need help to delete 'desktop.ini' files
 
Try that:
- cd to the directory from where you want to start removing 'desktop.ini' files.

Code:

#~ cd /home/user/MyDocs/Downloads/Folder
- Then use this command to find all desktop.ini files (it's a multiline command, a ">" will appear on each line when you press <ENTER>):

Code:

#~ find . -iname desktop.ini | while read name
do
ls -l "$name"
done

- Are these files the one you want to remove? (a list of files will appear from that command) If yes, proceed to the next commando, who will actually remove them:

Code:

#~ find . -iname desktop.ini | while read name
do
rm -f "$name"
done

----------------------------------
And btw, if you want to cd to that directory, try that (<TAB> is the "TAB" button in xterm):

Code:

#~ cd /home/user/MyDocs/Downloads/Folder/Q/Mazd<TAB>
It will change to:

Code:

#~ cd /home/user/MyDocs/Downloads/Folder/Q/Mazda\ \(Mx5\)
Then you can press enter and you'll change to that directory.

BTW, if you even want to remove the entire directory tree, do that:

Code:

#~ rm -rf /home/user/MyDocs/Downloads/Folder/Q
It will remove everything starting from Q (and including it). BEWARE, THIS COMMAND IS DANGEROUS BECAUSE IT ERASES STUFF.

BigLebowski 2010-03-16 12:00

Re: need help to delete 'desktop.ini' files
 
"BusyBox" is the name of the program that you'll be running when you open a terminal. Basically it's a command line interface with several build-in commands. Most of these commands are stripped down versions of traditional UNIX commands such as "find". In order to keep the memory footprint small, they tend to have fewer options (e.g. "find" doesn't know the "-exec" option).

rokafellaskank 2010-03-16 13:22

Re: need help to delete 'desktop.ini' files
 
rm: cannot remove '/home/user/MyDocs/Downloads/Folder/Q/Mazda (Mx5)': Permission denied
rm: cannot remove '/home/user/MyDocs/Downloads/Folder/Q/Mazda (Mx5)': Directory not empty
rm: cannot remove '/home/user/MyDocs/Downloads/Folder/Q': Directory not empty

damn it, i thought it was gonna do it. the first command found the .ini files then the second & third were a long list of whats pasted above. stubborn little bleeders! any more suggestions would be very welcome.

Modell900 2010-03-16 13:35

Re: need help to delete 'desktop.ini' files
 
Have you installed "rootsh" and run sudo gainroot?
Sounds weird that you can't delete em.

nicolai 2010-03-16 13:49

Re: need help to delete 'desktop.ini' files
 
Isn't the MyDocs folder on vfat partition on the internal memory card ?
No need to be root to delete something on a vfat partition.

Maybe the card is mounted read-only.

nicolai

rokafellaskank 2010-03-16 15:58

Re: need help to delete 'desktop.ini' files
 
Woo Hoo! I can't believe it, they're actually gone. Something as simple as 'sudo gainroot'! Thanks to all of you for your time and suggestions (ive hit all your thanks buttons).

But a big shout out goes to Patola & Modell900, couldn't of done it without you guys. Thank You.


All times are GMT. The time now is 08:03.

vBulletin® Version 3.8.8