It is currently Wed Mar 22, 2017 7:18 pm



Welcome
Welcome to rfobasic

You are currently viewing our boards as a guest, which gives you limited access to view most discussions and access our other features. By joining our free community, you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content, and access many other special features. In addition, registered members also see less advertisements. Registration is fast, simple, and absolutely free, so please, join our community today. **You are not required to provide truthful information to any registration questions. Be whomever you wish to be.!


Post new topic Reply to topic  [ 21 posts ]  Go to page 1, 2, 3  Next
Author Message
 Post subject: new to basic, need help
Unread postPosted: Sun Feb 26, 2017 4:52 pm 
Offline

Joined: Sun Feb 26, 2017 4:39 pm
Posts: 1
Hi,
I have recently started learning this and I am trying to write a pretty basic program. I have a bug with my android gallery app that creates a huge 3.6Gb file that is completely unnescesary in the location sdcard/DCIM/.thumbnails/bigfilename
The name of the file changes everytime it is recreated which happens often. I just want an easy way to delete the .thumbnails folder. So far this is what I can think of

File.delete abcd, "../../DCIM/thumbnails"

Can anyone tell me if this works and if I can convert this to apk with it still working?


Report this post
Top
 Profile  
 
 Post subject: Re: new to basic, need help
Unread postPosted: Sun Feb 26, 2017 6:16 pm 
Offline

Joined: Sat May 14, 2011 7:43 am
Posts: 353
Location: South Africa, UK & US (Florida)
It certainly looks as if it ought to work. Why not try it and see? Or better still find out WHY you are creating this redundant folder and file, then fix that.
If it works ok in Editor it will also work unchanged in apk (as created by Mougino apps anyway) but be very careful with the folder/file names as these ARE Case-sensitive in apk but NOT so in Editor.

Peter


Report this post
Top
 Profile  
 
 Post subject: Re: new to basic, need help
Unread postPosted: Mon Feb 27, 2017 12:16 am 
Offline
User avatar

Joined: Sat Dec 08, 2012 2:14 am
Posts: 1102
Location: UK
.thumbnails? Are you plugging your phone into a PC? That's a Windows thing. Not Android...

Mog


Report this post
Top
 Profile  
 
 Post subject: Re: new to basic, need help
Unread postPosted: Mon Feb 27, 2017 2:23 pm 
Offline

Joined: Sat Feb 11, 2017 1:40 am
Posts: 51
Hidden file .thumbnails exists in my lollipop mobile by itself, seems related to Chrome.


Report this post
Top
 Profile  
 
 Post subject: Re: new to basic, need help
Unread postPosted: Mon Feb 27, 2017 3:28 pm 
Offline

Joined: Sat May 14, 2011 7:43 am
Posts: 353
Location: South Africa, UK & US (Florida)
Nothing like it, hidden or otherwise, on my Nexus 6 (Marshmallow). Using Chrome as default browswer.
However, that shouldn't affect deletion of the folder,although I notice that in your suggested file.delete command you had (presumably accidentally) omitted the leading period (.) before thumbnail. It is of course significant. I have tested creating and deleting sdcard/DCIM/.poodle without trouble.
But perhaps the folder is related to one or more of the camera or photo or gallery apps installed, which may not work as expected without it?

Peter


Report this post
Top
 Profile  
 
 Post subject: Re: new to basic, need help
Unread postPosted: Mon Feb 27, 2017 4:56 pm 
Offline
User avatar

Joined: Sat Dec 08, 2012 2:14 am
Posts: 1102
Location: UK
Yes, I'm still convinced it's a Windows generated file. I plug my phone into my PC generally off. (I think then it looks at it as a storage device).

I have found a folder with that name that dates back to May of last year (attached screenshot) where I must have attached it to my 'pooter switched on.

I think it's some sort of "tombstone" that Windows has generated...

Okay, I think it's alright to play around with that sort of file. A probable sort of "cache" for Windows to show on your PC a preview of your pics.

Try and delete and make that an empty folder so it appears as "0 bytes". Maybe Windows would be stupid enough to see that file already exists and not to overwrite with their gumpf.

Of course back stuff up first!!!

Mog


Attachments:
Screenshot_2017-02-27-23-33-20.png
Screenshot_2017-02-27-23-33-20.png [ 83.55 KiB | Viewed 458 times ]
Report this post
Top
 Profile  
 
 Post subject: Re: new to basic, need help
Unread postPosted: Tue Feb 28, 2017 7:09 am 
Offline

Joined: Sat May 14, 2011 7:43 am
Posts: 353
Location: South Africa, UK & US (Florida)
I found this thread on Quora which may be relevant?

https://www.quora.com/What-will-happen- ... e=834a000a

It looks like the file is not essential to anything and can be safely deleted.

Peter


Report this post
Top
 Profile  
 
 Post subject: Re: new to basic, need help
Unread postPosted: Wed Mar 01, 2017 4:44 am 
Offline

Joined: Sat Feb 11, 2017 1:40 am
Posts: 51
Mog wrote:
Yes, I'm still convinced it's a Windows generated file. I plug my phone into my PC generally off. (I think then it looks at it as a storage device).

I have found a folder with that name that dates back to May of last year (attached screenshot) where I must have attached it to my 'pooter switched on.

I think it's some sort of "tombstone" that Windows has generated...
...
Mog


I specify for you Mog: I never connectd my phone to anything, and recently made a reset to factory state.
My .thumbnail file contains images in some way related with my browsers: news in home page or suggested links; perhaps with Google searches. Some ones are related with adds encountered.

The file is on sdcard/ (also in emulated which is a mirror of sdcard, itself a shortcut
to a subdirectory of mnt/); again: card never connected to anything. I easily delete that file since the Android file manager, also from others.
My one very slowly grows, perhaps because I block adds and rarely make Google search.


Last edited by Sprougnaf on Sun Mar 05, 2017 11:50 am, edited 1 time in total.

Report this post
Top
 Profile  
 
 Post subject: Re: new to basic, need help
Unread postPosted: Thu Mar 02, 2017 12:43 am 
Offline

Joined: Wed Oct 03, 2012 9:53 am
Posts: 2775
Location: Colorado, U.S.
I can confirm that DCIM/.thumbnails has been around for a long time on Android. If you delete it, sooner or later something will recreate it.

I believe (but haven't confirmed) that when Windows creates a thumbnail cache, it is called thumbs.db, or something like that. The leading dot is used by Unix file systems to hide a file, unless the user does something special to see it. Windows can handle leading dots these days, but it has never liked them much. In some versions of Windows, you can't convince the Explorer to name a file with a leading dot.

As Peter showed, googling "Android DCIM/.thumbnails" yields a lot of comments that generally say what we're saying here. I also found some suggestions for preventing the gigantic cache file that some Androids create when you have a lot of pictures, but the posts I found were pretty old. You might need something fresher.

But the real reason I'm posting is to warn/remind you that "File.Delete" will delete a directory only if it is empty.
In the general case, you have to delete directories recursively: delete all the files, descend into any directories, repeat. For your specific case, you could contrive something simpler.

- Marc


Report this post
Top
 Profile  
 
 Post subject: Re: new to basic, need help
Unread postPosted: Thu Mar 02, 2017 2:44 am 
Offline
User avatar

Joined: Thu Jan 08, 2015 11:28 am
Posts: 1087
Location: .NET
From what I know,
.thumbnails is Android thumbnail cache, it's used by the media database to, well, cache thumbnails for your gallery and other applications as an example. The problem with it is that it doesn't get cleared, so with new images it will just cram in thumbnails in the cache, often resulting in hundreds of megabytes (I have seen gigabytes), although it might have been fixed in newest android versions. It can be safely removed.

The media system in Android has always been weird. For example, any type of media content, be it images, music, videos, requires a scan by the media system to be used/seen at all in applications.

_________________
https://github.com/evolbug
http://toobasic.jimdo.com


Report this post
Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 21 posts ]  Go to page 1, 2, 3  Next


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
suspicion-preferred