@__thumb files - How do do I get rid of them?

Don't miss a thing. Post your questions and discussion about other uncategorized NAS features here.
doubter13
Starting out
Posts: 28
Joined: Wed Sep 09, 2009 2:08 pm

Re: @__thumb files - How do do I get rid of them?

Post by doubter13 » Mon Apr 28, 2014 5:11 am

Kronissimo54 wrote:Hello,

the script didn't work for me.

I have installed Phyton over the Web-Adimistration with "Get QPKG" and activated it.

Then, i tried to start the script in Putty, but just became this message:

Code: Select all

[/share/Medien] # python rmthumb.py
  File "rmthumb.py", line 1
    import os, shutil
    ^
IndentationError: unexpected indent


I named the script "rmthum.py", and created it with WinSCP in /share/Medien.

How can i get it started?


Have the same problem...
did you figure it out?
QNAP TS-470 Pro [4.3.6.1333 (2020/06/08)]
- disks: 4xWD30EFRX-68EUZN0 3TB, ext3
- SSD: 1xSAMSUNG SSD 840 EVO 500GB

doubter13
Starting out
Posts: 28
Joined: Wed Sep 09, 2009 2:08 pm

Re: @__thumb files - How do do I get rid of them?

Post by doubter13 » Tue Apr 29, 2014 12:18 am

found the problem myself
there was a problem with the coding
somehow the file i created had DOS encoding, not unix
i also deleted some spaces in front of "import os, shutil"
now it is working
QNAP TS-470 Pro [4.3.6.1333 (2020/06/08)]
- disks: 4xWD30EFRX-68EUZN0 3TB, ext3
- SSD: 1xSAMSUNG SSD 840 EVO 500GB

User avatar
Toxic17
Ask me anything
Posts: 5432
Joined: Tue Jan 25, 2011 11:41 pm
Location: Planet Earth
Contact:

Re: @__thumb files - How do do I get rid of them?

Post by Toxic17 » Thu Oct 30, 2014 3:32 am

voxtreet wrote:- Log onto your QNAP machine (I use SSH)
- Navigate to the directory under which you want to delete all thumbnails
- Create a new file called rmthumbnails.py
- Copy and paste the following code into that file

Code: Select all

import os, shutil

for root, dirs, files in os.walk('.', topdown=False):
        print "Root: %s" % root
        for dir in dirs:
                if dir == '.@__thumb':
                        delpath = os.path.join(root, dir)
                        print "Removing %s" % delpath
                        shutil.rmtree(delpath)
        for file in files:
                if file == '.hightlight':
                        delpath = os.path.join(root, file)
                        print "Removing %s" % delpath
                        os.remove(delpath)
                elif file == 'Picasa.ini':
                        delpath = os.path.join(root, file)
                        print "Removing %s" % delpath
                        os.remove(delpath)
                elif file == 'Thumbs.db':
                        delpath = os.path.join(root, file)
                        print "Removing %s" % delpath

- Run it!

Code: Select all

#python rmthumbnails.py


That should do it!

Thanks!


Thanks for the fix!
Regards Simon

QTS 4.x User Guidex

QNAP Club Repository
Submit a ticket • QNAP Helpdesk
QNAP Tutorials, User Manuals, FAQs, Downloads, Wiki
When you ask a question, please include the following


NAS: TS-473-32GB QM2-2P QXG-10G1T 4.4.2.1354 • TVS-463-16GB 4.4.2.1354 QM2-2S10G1TB • TS-459 Pro 2GB 4.2.6 • TS-121 4.3.3.1161 • APC Back-UPS ES 700G •
QPKG's: Plex 1.19.3 • Apache73 v2443.74070 • QSonarr 3.0.3.809 • QNBZGet 21.0 • phpMyAdmin 5.0.2 • Qmono 6.80.105 • McAfee 3.1.0 -6010 • HBS 3.0.200424 • LEgo v3.6.0
Network: VM Hub 3.0 <500/35> • UniFi USG Pro 4 • UniFi USW-16-150W • UniFi USW-8-60W • UniFi CloudKey Gen2+ • UniFi G3-Flex • UAP AC Pro • UAP AC Lite • SLM2008 • Dell 7050 MFF •

ednap
Starting out
Posts: 26
Joined: Tue Jan 06, 2015 1:07 pm

Re: @__thumb files - How do do I get rid of them?

Post by ednap » Sun Jan 11, 2015 3:33 pm

Anybody consider using find?

find . -name ".@__thumb" -print will provide the path to all these files

if you dare you can try

find . -name ".@__thumb" -exec rm -rf {} \;

Please test wisely first.

ednap
Starting out
Posts: 26
Joined: Tue Jan 06, 2015 1:07 pm

Re: @__thumb files - How do do I get rid of them?

Post by ednap » Sun Jan 11, 2015 3:33 pm

Anybody consider using find?

find . -name ".@__thumb" -print will provide the path to all these files

if you dare you can try

find . -name ".@__thumb" -exec rm -rf {} \;

Please test wisely first.

Yezariael75
New here
Posts: 6
Joined: Thu Apr 04, 2013 3:32 am

Re: @__thumb files - How do do I get rid of them?

Post by Yezariael75 » Thu Apr 09, 2015 3:54 am

No luck for me :(

If i execute the rmthumbnails.py the connection of WinSCP times out and nothing happens. If I try the find . -name ".@__thumb" -exec rm -rf {} \; command I get an error message (attached). Nonetheless, the find . -name ".@__thumb" -print command works.

What can I try next?

Thanks!
You do not have the required permissions to view the files attached to this post.

ednap
Starting out
Posts: 26
Joined: Tue Jan 06, 2015 1:07 pm

Re: @__thumb files - How do do I get rid of them?

Post by ednap » Thu Apr 09, 2015 4:33 am

Looks like the version of find included in the Qnap os doens't have exec..

so I guess you could pipe the output to xargs

find . -name ".@__thumb" | xargs -t rm

I suggest you test first with "ls" instead of "rm" and be very careful with this!

OsefYep
New here
Posts: 6
Joined: Fri Apr 13, 2012 6:57 pm

Re: @__thumb files - How do do I get rid of them?

Post by OsefYep » Tue Jun 09, 2015 12:55 am

Ok, so we have a 3 pages thread WITH NO INTERVENTION OF ANY QNAP STAFF about some ** folder/files generated at 3 am that everyone wants to remove.

I have version 4.1.3 on a TS-459 Pro+.

I don't see in the crontab file what can cause the generation. It is generated at 3 AM, but the scripts running at 3 am doesn't correspond :

# m h dom m dow cmd
0 4 * * * /sbin/hwclock -s
0 3 * * * /sbin/vs_refresh
0 3 * * 0 /etc/init.d/idmap.sh dump
0 3 * * * /sbin/clean_reset_pwd
0-59/15 * * * * /etc/init.d/nss2_dusg.sh
30 7 * * * /sbin/clean_upload_file
30 3 * * * /sbin/notice_log_tool -v -R
4 3 * * 3 /etc/init.d/backup_conf.sh
30 7 * * * /usr/local/sbin/version_cleaner -t 0 > /dev/null 2>/dev/null
58 10 * * * /usr/bin/qcloud_cli -c


Batch removing the folders is trivial. I want to stop the generation.

QNAP STAFF, can we have an answer please ?

User avatar
pwilson
Guru
Posts: 22568
Joined: Fri Mar 06, 2009 11:20 am
Location: Victoria, BC, Canada (UTC-08:00)

Re: @__thumb files - How do do I get rid of them?

Post by pwilson » Tue Jun 09, 2015 1:03 am

OsefYep wrote:Ok, so we have a 3 pages thread WITH NO INTERVENTION OF ANY QNAP STAFF about some ** folder/files generated at 3 am that everyone wants to remove.


This is not a QNAP Support channel. If you want to contact QNAP Helpdesk staff, you can do so by submitting a ticket.

This is merely a Community Forum (check the title of this Forum). QNAP typically does not post very often to this Forum.

Patrick M. Wilson
Victoria, BC Canada
QNAP TS-470 Pro w/ 4 * Western Digital WD30EFRX WD Reds (RAID5) - - Single 8.1TB Storage Pool FW: QTS 4.2.0 Build 20151023 - Kali Linux v1.06 (64bit)
Forums: View My Profile - Search My Posts - View My Photo - View My Location - Top Community Posters
QNAP: Turbo NAS User Manual - QNAP Wiki - QNAP Tutorials - QNAP FAQs

Please review: When you're asking a question, please include the following.

wazzageek
Starting out
Posts: 28
Joined: Sun Dec 09, 2012 6:58 pm

Re: @__thumb files - How do do I get rid of them?

Post by wazzageek » Tue Jul 14, 2015 8:17 pm

voxtreet wrote:- Log onto your QNAP machine (I use SSH)
- Navigate to the directory under which you want to delete all thumbnails
- Create a new file called rmthumbnails.py
- Copy and paste the following code into that file

Code: Select all

import os, shutil

for root, dirs, files in os.walk('.', topdown=False):
        print "Root: %s" % root
        for dir in dirs:
                if dir == '.@__thumb':
                        delpath = os.path.join(root, dir)
                        print "Removing %s" % delpath
                        shutil.rmtree(delpath)
        for file in files:
                if file == '.hightlight':
                        delpath = os.path.join(root, file)
                        print "Removing %s" % delpath
                        os.remove(delpath)
                elif file == 'Picasa.ini':
                        delpath = os.path.join(root, file)
                        print "Removing %s" % delpath
                        os.remove(delpath)
                elif file == 'Thumbs.db':
                        delpath = os.path.join(root, file)
                        print "Removing %s" % delpath

- Run it!

Code: Select all

#python rmthumbnails.py


That should do it!

Thanks!


I had similar issues getting this to work as others did but eventually got it to work by dropping the # symbol from the front of the command.

So the command was as follows using the command run feature in the WinSCP terminal.

Code: Select all

python rmthumbnails.py


Cheers, Waz.

tbgoose
Starting out
Posts: 13
Joined: Mon Aug 10, 2015 1:39 pm

Re: @__thumb files - How do do I get rid of them?

Post by tbgoose » Mon Sep 14, 2015 8:44 am

voxtreet wrote:... I wrote a Python script to remove all those pesky "@__thumbs" thumbnails...


Cheers mate, worked a treat!

Dmitri
First post
Posts: 1
Joined: Sun Oct 18, 2015 5:44 pm

Re: @__thumb files - How do do I get rid of them?

Post by Dmitri » Sun Oct 18, 2015 5:54 pm

If somebody will decide to delete them in DOS/Windows. This is the content of a batch file to run.

Code: Select all

 for /r %%i in (.@__thumb) do rd /s/q "%%i"

User avatar
janpolet
Easy as a breeze
Posts: 276
Joined: Fri Jun 12, 2009 5:01 pm
Location: Rijswijk, the Netherlands

Re: @__thumb files - How do do I get rid of them?

Post by janpolet » Sat Oct 24, 2015 7:44 pm

voxtreet wrote:Hi,

I have noticed the same thing. At first I thought it was the Multimedia Station, but even when I disabled it, they still appeared. Good to learn that it is the cron job that is creating them every night. I'm having trouble commenting out the ImR_all line in the crontab, though. I do crontab -e, and put the "#" in front of the line, then do Esc and :wq to save and exit. But the next time I look at the crontab (crontab -l) the comment isn't there anymore. Any hints?

Anyways, I wrote a Python script to remove all those pesky "@__thumbs" thumbnails under the current directory and all subdirectories. I was using this for my Photo collection, so my script also removes ".hightlight" files (what are those anyway?), Thumbs.db, and picasa.ini files, you can remove those lines if you don't care about those. It works for me, but as I'm not an official QNAP representative, USE AT YOUR OWN RISK!

- Log onto your QNAP machine (I use SSH)
- Navigate to the directory under which you want to delete all thumbnails
- Create a new file called rmthumbnails.py
- Copy and paste the following code into that file

Code: Select all

import os, shutil

for root, dirs, files in os.walk('.', topdown=False):
        print "Root: %s" % root
        for dir in dirs:
                if dir == '.@__thumb':
                        delpath = os.path.join(root, dir)
                        print "Removing %s" % delpath
                        shutil.rmtree(delpath)
        for file in files:
                if file == '.hightlight':
                        delpath = os.path.join(root, file)
                        print "Removing %s" % delpath
                        os.remove(delpath)
                elif file == 'Picasa.ini':
                        delpath = os.path.join(root, file)
                        print "Removing %s" % delpath
                        os.remove(delpath)
                elif file == 'Thumbs.db':
                        delpath = os.path.join(root, file)
                        print "Removing %s" % delpath

- Run it!

Code: Select all

#python rmthumbnails.py


That should do it!

Thanks!


Thanks so much! Seems to have worked like a charm! :)
Jan Polet
location: Rijswijk, the Netherlands

MAIN NAS: QNAP TS-469L (firmware 4.3.4.0820 build 0102)
- disks:

- Bay 1: 3Tb Seagate ST3000NM0033-9ZMSN04 (9ZM178) with firmware SN04
- Bay 2: 3Tb Seagate ST3000NM0033-9ZM0001 (9ZM178) with firmware 0001
- Bay 3: 3Tb Seagate ST3000NM0033-9ZM0001 (9ZM178) with firmware 0001
- Bay 4: 3Tb Seagate ST3000NM0033-9ZMSN03 (9ZM178) with firmware SN03

- config: RAID5

BACKUP NAS: QNAP TS-439 PRO (firmware 4.2.6 build 1227)
- disks:

- Bay 1: 3Tb Seagate ST3000NM0033-9ZMSN03 (9ZM178) with firmware SN03
- Bay 2: 3Tb Seagate ST3000NM0033-9ZMSN03 (9ZM178) with firmware SN03
- Bay 3: 3Tb Seagate ST3000NM0033-9ZMSN03 (9ZM178) with firmware SN03
- Bay 4: empty

- config: RAID0 (3 drives)

User avatar
papampi
Getting the hang of things
Posts: 56
Joined: Sat Jun 06, 2015 2:52 pm
Contact:

Re: @__thumb files - How do do I get rid of them?

Post by papampi » Wed Jan 27, 2016 4:04 pm

I just found a way to completely disable creating .@__thumb folders,
Even if you disable media folders when you open any media folder in file station it will create .@__thumb folder.
So the best way is :

Code: Select all

1- Open file station
2- Top right corner click setting icon (between help and refresh)
3- Uncheck "support multimedia playback and thumbnail display"
4- Voila .... never see   .@__thumb folders again.


I dont know what multimedia playback it disbales, I have no problem playback on kodi
Models: TVS-863, HS-251

User avatar
Toxic17
Ask me anything
Posts: 5432
Joined: Tue Jan 25, 2011 11:41 pm
Location: Planet Earth
Contact:

Re: @__thumb files - How do do I get rid of them?

Post by Toxic17 » Thu Jan 28, 2016 9:10 pm

what does the output say when you run the command "python rmthumbnails.py" ?
Regards Simon

QTS 4.x User Guidex

QNAP Club Repository
Submit a ticket • QNAP Helpdesk
QNAP Tutorials, User Manuals, FAQs, Downloads, Wiki
When you ask a question, please include the following


NAS: TS-473-32GB QM2-2P QXG-10G1T 4.4.2.1354 • TVS-463-16GB 4.4.2.1354 QM2-2S10G1TB • TS-459 Pro 2GB 4.2.6 • TS-121 4.3.3.1161 • APC Back-UPS ES 700G •
QPKG's: Plex 1.19.3 • Apache73 v2443.74070 • QSonarr 3.0.3.809 • QNBZGet 21.0 • phpMyAdmin 5.0.2 • Qmono 6.80.105 • McAfee 3.1.0 -6010 • HBS 3.0.200424 • LEgo v3.6.0
Network: VM Hub 3.0 <500/35> • UniFi USG Pro 4 • UniFi USW-16-150W • UniFi USW-8-60W • UniFi CloudKey Gen2+ • UniFi G3-Flex • UAP AC Pro • UAP AC Lite • SLM2008 • Dell 7050 MFF •

Post Reply

Return to “Miscellaneous”