04-22-2013, 05:46 PM | #1 |
Addict
Posts: 250
Karma: 136662
Join Date: Apr 2011
Device: N/A
|
Paperwhite - Leftover folders after removing a book
After removing a book on Paperwhite, using the usual interface method (i.e. no USB or otherwise), the book-filename.sdr folder is still there, inside the documents folder. It will have to be removed manually. I find this very annoying.
Is there a solution to this problem? Maybe a script to clean documents folder, written for Kindle Launcher? Last edited by hfpop; 04-22-2013 at 06:12 PM. |
04-22-2013, 06:55 PM | #2 |
Resident Curmudgeon
Posts: 76,028
Karma: 134368292
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Are you using Calibre to manage your content?
|
Advert | |
|
04-22-2013, 09:18 PM | #3 | |
( ͡° ͜ʖ ͡°){ʇlnɐɟ ƃǝs}Týr
Posts: 6,586
Karma: 6299991
Join Date: Jun 2012
Location: uti gratia usura (Yao ying da ying; Mo ying da yieng)
Device: PW-WIFI|K5-3G+WIFI| K4|K3-3G|DXG|K2| Rooted Nook Touch
|
Quote:
Code:
REPORT="/mnt/us/documents/FolderReport.txt"; rm -f $REPORT ; echo "new Report `date`" > $REPORT; IFS=$'\n'; for TEST in $(ls -d /mnt/us/documents/* | grep .sdr); do echo -ne "\r\rFOLDER= $TEST\r" >> $REPORT; TEST2=$(ls -Al "`dirname \"$TEST\"`""/""`echo "$TEST"| sed 's|.*\/\([^\.]*\)\(\..*\)$|\1|g'`".*"" | grep -v 'sdr' | grep "`dirname \"$TEST\"`" ) ; echo "MATCHING DOCUMENT= --[""$TEST2""]--" >> $REPORT; if [ -z "$TEST2" ]; then echo "DELETION CANDIDATE SELECTED $TEST" >> $REPORT ; rm -rf "$TEST" ;fi; done; something like that Code:
new Report Tue Apr 23 09:01:22 UTC 2013 FOLDER= /mnt/us/documents/3rd Sight_ A Horror Novel_123.sdr MATCHING DOCUMENT= --[-rwxr-xr-x 1 root root 399924 Mar 1 16:22 /mnt/us/documents/3rd Sight_ A Horror Novel_123.azw3]-- FOLDER= /mnt/us/documents/Ash_123.sdr MATCHING DOCUMENT= --[-rwxr-xr-x 1 root root 759140 Sep 20 2012 /mnt/us/documents/Ash_123.azw3]-- FOLDER= /mnt/us/documents/Battery-2013-02-28T17.50UTC.sdr MATCHING DOCUMENT= --[]-- DELETION CANDIDATE SELECTED /mnt/us/documents/Battery-2013-02-28T17.50UTC.sdr FOLDER= /mnt/us/documents/Chinese Chess Rules - Awak.sdr MATCHING DOCUMENT= --[-rwxr-xr-x 1 root root 383635 Feb 27 23:59 /mnt/us/documents/Chinese Chess Rules - Awak.azw3]-- FOLDER= /mnt/us/documents/Cloud Atlas_123.sdr MATCHING DOCUMENT= --[-rwxr-xr-x 1 root root 1371188 Apr 7 11:13 /mnt/us/documents/Cloud Atlas_123.azw3]-- FOLDER= /mnt/us/documents/Countdown_ H Hour_123.sdr MATCHING DOCUMENT= --[-rwxr-xr-x 1 root root 712620 Jan 11 06:47 /mnt/us/documents/Countdown_ H Hour_123.azw]-- FOLDER= /mnt/us/documents/Csound5.18_manual.sdr MATCHING DOCUMENT= --[-rwxr-xr-x 1 root root 11231282 Aug 28 2012 /mnt/us/documents/Csound5.18_manual.pdf]-- FOLDER= /mnt/us/documents/FolderReport.sdr MATCHING DOCUMENT= --[-rwxr-xr-x 1 root root 1366 Apr 23 01:15 /mnt/us/documents/FolderReport.txt]-- FOLDER= /mnt/us/documents/IMX50SDG.sdr MATCHING DOCUMENT= --[-rwxr-xr-x 1 root root 2182355 Sep 23 2012 /mnt/us/documents/IMX50SDG.pdf]-- FOLDER= /mnt/us/documents/Klingon.sdr MATCHING DOCUMENT= --[-rwxr-xr-x 1 root root 277482 Mar 7 03:17 /mnt/us/documents/Klingon.mobi]-- FOLDER= /mnt/us/documents/My Clippings.sdr MATCHING DOCUMENT= --[]-- DELETION CANDIDATE SELECTED /mnt/us/documents/My Clippings.sdr FOLDER= /mnt/us/documents/My_Own_Kind_of_Freedom.sdr MATCHING DOCUMENT= --[-rwxr-xr-x 1 root root 426966 Mar 8 19:33 /mnt/us/documents/My_Own_Kind_of_Freedom.mobi]-- FOLDER= /mnt/us/documents/Vulcan.sdr MATCHING DOCUMENT= --[-rwxr-xr-x 1 root root 651312 Mar 7 03:17 /mnt/us/documents/Vulcan.mobi]-- FOLDER= /mnt/us/documents/WAFs info.sdr MATCHING DOCUMENT= --[]-- DELETION CANDIDATE SELECTED /mnt/us/documents/WAFs info.sdr FOLDER= /mnt/us/documents/XWINSYS.sdr MATCHING DOCUMENT= --[-rwxr-xr-x 1 root root 1545159 Dec 17 04:00 /mnt/us/documents/XWINSYS.PDF]-- FOLDER= /mnt/us/documents/botsies.sdr MATCHING DOCUMENT= --[-rwxr-xr-x 1 root root 168499 Mar 23 18:50 /mnt/us/documents/botsies.mobi]-- FOLDER= /mnt/us/documents/dmesg-2013-04-01T22.09UTC.sdr MATCHING DOCUMENT= --[-rwxr-xr-x 1 root root 15583 Apr 1 22:09 /mnt/us/documents/dmesg-2013-04-01T22.09UTC.txt]-- FOLDER= /mnt/us/documents/doc32082.sdr MATCHING DOCUMENT= --[-rwxr-xr-x 1 root root 152785 Oct 9 2012 /mnt/us/documents/doc32082.pdf]-- FOLDER= /mnt/us/documents/dotsies.sdr MATCHING DOCUMENT= --[]-- DELETION CANDIDATE SELECTED /mnt/us/documents/dotsies.sdr FOLDER= /mnt/us/documents/gtkLog.sdr MATCHING DOCUMENT= --[-rwxr-xr-x 1 root root 20480 Apr 15 19:23 /mnt/us/documents/gtkLog.txt]-- FOLDER= /mnt/us/documents/kindle_waf_guide.sdr MATCHING DOCUMENT= --[-rwxr-xr-x 1 root root 10292 Sep 24 2012 /mnt/us/documents/kindle_waf_guide.mobi]-- FOLDER= /mnt/us/documents/nadsat.sdr MATCHING DOCUMENT= --[-rwxr-xr-x 1 root root 204611 Mar 17 21:32 /mnt/us/documents/nadsat.mobi]-- FOLDER= /mnt/us/documents/nadsat_test.sdr MATCHING DOCUMENT= --[-rwxr-xr-x 1 root root 9486 Mar 7 03:18 /mnt/us/documents/nadsat_test.mobi]-- EDITS: v4 - Fixed typo in menu.json (twice) v3 - made reports have internal timestamps and to correctly update "most recent" report when sorted by recency. v2 - Added corrected line-spacing escapes to reports v1 - Made it work Last edited by twobob; 04-23-2013 at 05:02 AM. |
|
04-22-2013, 10:52 PM | #4 |
Evangelist
Posts: 456
Karma: 1287375
Join Date: Jan 2013
Location: West Gardiner, Maine
Device: Touch (5.3.7)
|
Hey, cool! Very handy! Thanks!
|
04-23-2013, 02:24 AM | #5 |
Addict
Posts: 250
Karma: 136662
Join Date: Apr 2011
Device: N/A
|
@twobob: Thank you.
|
Advert | |
|
04-23-2013, 02:44 AM | #6 |
Ex-Helpdesk Junkie
Posts: 19,421
Karma: 85397180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
|
The .sdr is removed specifically when a book is deleted through the Kindle interface and ISN'T in your cloud. I assume Amazon doesn't want people to lose the notes/highlights/bookmarks on their sideloaded books unless they really want it gone.
If you delete a book using calibre, it cleans up after the book as well, removing the .sdr since calibre knows how to write generated .apnx's there. |
04-23-2013, 07:59 AM | #7 |
Grand Sorcerer
Posts: 6,537
Karma: 14008730
Join Date: May 2008
Location: PA (USA)
Device: Kobo Clara, 2E, Libre 1, PW4, PW5, 2022 Kindle, Kobo Libre Colour
|
Removing via Calibre does seem to delete those extra folders/files.
|
04-23-2013, 09:14 AM | #8 |
Addict
Posts: 250
Karma: 136662
Join Date: Apr 2011
Device: N/A
|
I am sorry, but I honestly believe this is not true. I removed books using the Kindle interface and the .sdr folders are still there. I have been using Kindle PaperWhite, firmware 5.3.1, 5.3.3 and 5.3.4, all with the same result.
|
04-23-2013, 01:11 PM | #9 |
Wizard
Posts: 2,251
Karma: 3720310
Join Date: Jan 2009
Location: USA
Device: Kindle, iPad (not used much for reading)
|
And the book wasn't in your Archives (cloud)?
|
04-23-2013, 01:33 PM | #10 |
Addict
Posts: 250
Karma: 136662
Join Date: Apr 2011
Device: N/A
|
No. I was in airplane mode during all this experiment. The original book was sideloaded manually (i.e. without the use of any software other than the OS itself).
|
04-23-2013, 01:34 PM | #11 |
Addict
Posts: 250
Karma: 136662
Join Date: Apr 2011
Device: N/A
|
I propose the following. Please comment.
Code:
#!/bin/sh for FILE in `find /mnt/us/documents -name '*.sdr' -print 2>/dev/null` do FSPEC="${FILE%*.*}.*" FOUND=0 for TEST in $FSPEC do if [ -f $TEST ]; then FOUND=1 fi done if [ "$FOUND" -eq 0 ]; then rm -rf "$FILE" fi done |
04-23-2013, 02:19 PM | #12 |
Enthusiast
Posts: 29
Karma: 48374
Join Date: Apr 2013
Location: Brazil
Device: Kindle PW
|
Tks, twobob. It worked great.
|
04-24-2013, 01:09 AM | #13 | |
Ex-Helpdesk Junkie
Posts: 19,421
Karma: 85397180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
|
Quote:
And Whenever I delete a book through calibre, it gets rid of the .sdr no matter what. The why were just my own speculation. |
|
04-25-2013, 08:50 AM | #14 |
Addict
Posts: 250
Karma: 136662
Join Date: Apr 2011
Device: N/A
|
FolderPruner 0.2
I attach a an archive counting as version 0.2 of FolderPruner. Essential changes from 0.1:
- no text report is generated - all folders *.sdr in the substructure of /mnt/us/documents are considered, i.e. all descendants, not only the children. Iterations: v1: initial iteration v2: it allows folder names that include spaces Last edited by hfpop; 04-28-2013 at 06:02 AM. |
04-25-2013, 08:55 AM | #15 | |
Addict
Posts: 250
Karma: 136662
Join Date: Apr 2011
Device: N/A
|
I apologize. I am not an English native, but this is not what I understood.
Quote:
|
|
Tags |
launcher add-ons |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Removing Waterstones Screensaver on Paperwhite | jforner | Amazon Kindle | 3 | 01-02-2013 07:38 AM |
Removing "Personal" Label on the Paperwhite | centhena | Kindle Developer's Corner | 17 | 12-29-2012 05:10 AM |
.SDR folders empty when loading MOBI covers on Kindle Paperwhite | abarnard | Library Management | 1 | 12-25-2012 09:57 PM |
How Can I Keep Links in Book Folders | BetterRed | Calibre | 6 | 04-06-2012 06:38 AM |
Folders! I've got folders! - A short review of the BeBook Mini | Elsi | BeBook | 10 | 09-26-2009 02:47 AM |