INTERACT FORUM

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: How to Automatically Delete or Remove Empty or Orphaned Folders?  (Read 3467 times)

HoorayMusic

  • Recent member
  • *
  • Posts: 9

I cant seem to find the options (if they exist) to get Media Center 17 to automatically delete empty folders. 

For example:  In MC_v17, I delete an audio file that happens to be the only file in the folder it's in.  MC_v17 will prompt me with 3 options (remove from library, remove from disk, permanently remove from disk), nowhere do I get a prompt asking to also remove the soon to be empty folder.

So first off... Does MC_17 provide any functionality that would delete empty folders within its library?  If so, how do I enable, configure, or otherwise get this to happen?


This post no longer seems up-to-date for the latest Media Center  - "Topic: Rename Files / Delete empty folder: where is that option?  (Read 663 times)" http://yabb.jriver.com/interact/index.php?topic=35647.0
* I've searched the registries (both 32 and 64 bit versions) to no avail.


Windows 7 - 64bit
 
Logged

Matt

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 42373
  • Shoes gone again!
Re: How to Automatically Delete or Remove Empty or Orphaned Folders?
« Reply #1 on: March 01, 2012, 07:44:48 pm »

Perhaps you said 'don't remove empty folder' and checked don't ask again?

You can reset confirmations in Options (search for 'reset').
Logged
Matt Ashland, JRiver Media Center

HoorayMusic

  • Recent member
  • *
  • Posts: 9
Re: How to Automatically Delete or Remove Empty or Orphaned Folders?
« Reply #2 on: March 01, 2012, 08:43:59 pm »

Thanks for the quick response!

I was able to reset the confirmations via the way you suggested.  So, now when I delete a file, I still get the 3 options for how to delete the file.  Then I'm prompted to confirm the file being recycled or deleted.  Unfortunately, there is nothing about also removing the empty folder. 

I'm running Media Center 17.0.82

Logged

Matt

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 42373
  • Shoes gone again!
Re: How to Automatically Delete or Remove Empty or Orphaned Folders?
« Reply #3 on: March 01, 2012, 08:45:47 pm »

Is it possible there's still a file in the folder?

Be sure to turn on viewing of hidden files when you check.

Thanks.
Logged
Matt Ashland, JRiver Media Center

rjm

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 2699
Re: How to Automatically Delete or Remove Empty or Orphaned Folders?
« Reply #4 on: March 01, 2012, 08:48:48 pm »

Another common mistake is to be viewing the folder with Windows Explorer. This locks the folder and prevents MC from deleting it. If you don't wait too long, notice your error, and close Explorer, then MC will usually delete the folder since it seems to wait and retry for a while.
Logged

HoorayMusic

  • Recent member
  • *
  • Posts: 9
Re: How to Automatically Delete or Remove Empty or Orphaned Folders?
« Reply #5 on: March 01, 2012, 09:03:46 pm »

I have noticed something odd...  So Windows Explorer is set to show hidden files and folders, and the folder appears to be empty when viewed with Windows Explorer.

However, when I view the folder with Media Center - Drives & Devices - Explorer (unchecked "Show only files in library", so all files are shown), I still have 5 files left in the folder, and 1 in the parent folder.
* E:\Music\iTunes\Music\Bell Biv DeVoe\desktop.ini
* E:\Music\iTunes\Music\Bell Biv DeVoe\Poison\desktop.ini.
* E:\Music\iTunes\Music\Bell Biv DeVoe\Poison\AlbumArt_{E6EF59ED-044C-4A59-BFEB-CA2E5890CC01}_Large.jpg
* E:\Music\iTunes\Music\Bell Biv DeVoe\Poison\AlbumArt_{E6EF59ED-044C-4A59-BFEB-CA2E5890CC01}_Small.jpg
* E:\Music\iTunes\Music\Bell Biv DeVoe\Poison\AlbumArtSmall.jpg
* E:\Music\iTunes\Music\Bell Biv DeVoe\Poison\Folder.jpg

Could iTunes have something to do with this?  (btw, I'm trying out MC to hopefully be rid if iTunes).
Logged

HoorayMusic

  • Recent member
  • *
  • Posts: 9
Re: How to Automatically Delete or Remove Empty or Orphaned Folders?
« Reply #6 on: March 01, 2012, 09:11:02 pm »

OK... so I tested a folder with only a single music file in it (as confirmed with Media Center Explorer), and when I deleted the file, I was also prompted with the option to remove the folder.

That's good.

So I wonder what my music file management strategy will be from here regarding those other files, and if iTunes is really causing those extra files? 
Logged

HoorayMusic

  • Recent member
  • *
  • Posts: 9
Re: How to Automatically Delete or Remove Empty or Orphaned Folders?
« Reply #7 on: March 01, 2012, 09:16:39 pm »

I want to add to the this point about showing hidden files and folders.  I also should have chosen to un-check "Hide protected operating system files".
Logged

glynor

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 19608
Re: How to Automatically Delete or Remove Empty or Orphaned Folders?
« Reply #8 on: March 01, 2012, 11:24:42 pm »

* E:\Music\iTunes\Music\Bell Biv DeVoe\desktop.ini
* E:\Music\iTunes\Music\Bell Biv DeVoe\Poison\desktop.ini.
* E:\Music\iTunes\Music\Bell Biv DeVoe\Poison\AlbumArt_{E6EF59ED-044C-4A59-BFEB-CA2E5890CC01}_Large.jpg
* E:\Music\iTunes\Music\Bell Biv DeVoe\Poison\AlbumArt_{E6EF59ED-044C-4A59-BFEB-CA2E5890CC01}_Small.jpg
* E:\Music\iTunes\Music\Bell Biv DeVoe\Poison\AlbumArtSmall.jpg
* E:\Music\iTunes\Music\Bell Biv DeVoe\Poison\Folder.jpg

These are files created by Windows Explorer (and maybe some of them by iTunes).  They are hidden by default.

Both the desktop.ini and the cover art JPGs are common "lockers" of folder in Windows.  Sometimes you have to reboot to get Windows Explorer to release them.

You can try deleting them inside MC.  Or reboot.

They get auto-created when you just open and look at a folder in Windows Explorer.  They shouldn't stay locked like that once you close the view of the folder, but sometimes they get stuck on my systems.  Also make sure iTunes isn't running (even down in the tray, which is an option in iTunes).
Logged
"Some cultures are defined by their relationship to cheese."

Visit me on the Interweb Thingie: http://glynor.com/

FastKayak

  • World Citizen
  • ***
  • Posts: 196
Re: How to Automatically Delete or Remove Empty or Orphaned Folders?
« Reply #9 on: March 02, 2012, 08:32:14 am »

Every year or two I run "empty folder nuker" and clean out the left over stuff.  Search Google for it. 

(I'm not claiming it is the best or that it will decide a folder is even empty when the left Explorer stuff is still there...   Anyway, it works for me.)

FastKayak / Larry
Logged

Matt

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 42373
  • Shoes gone again!
Re: How to Automatically Delete or Remove Empty or Orphaned Folders?
« Reply #10 on: March 02, 2012, 08:38:35 am »

Our empty folder check ignores Thumbs.db.  So if the folder only has Thumbs.db, it'll still prompt and delete the folder.

We could add to the exclusion list, but something like Folder.jpg makes me a little nervous.

Thoughts?
Logged
Matt Ashland, JRiver Media Center

wig

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 750
Re: How to Automatically Delete or Remove Empty or Orphaned Folders?
« Reply #11 on: March 02, 2012, 08:49:18 am »

Our empty folder check ignores Thumbs.db.  So if the folder only has Thumbs.db, it'll still prompt and delete the folder.

We could add to the exclusion list, but something like Folder.jpg makes me a little nervous.

Thoughts?

I'd be in favor of adding Folger.jpg to the list.

Or you could made the list customizable. How about an option to point to an external exclusion list?
Logged

glynor

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 19608
Re: How to Automatically Delete or Remove Empty or Orphaned Folders?
« Reply #12 on: March 02, 2012, 09:01:14 am »

Our empty folder check ignores Thumbs.db.  So if the folder only has Thumbs.db, it'll still prompt and delete the folder.

It'll try anyway.  I hit problems often where that file (or desktop.ini) is in use, because I looked at the folder in Windows Explorer a while ago and for whatever reason it stays locked.  It doesn't happen every time, but I end up with a bunch of "empty" (air quotes) folders sitting around that MC should have deleted, but couldn't for one reason or another.

I have no problem with it nuking Folder.jpg or desktop.ini, personally.

I can see why you'd be nervous about the jpgs though.
Logged
"Some cultures are defined by their relationship to cheese."

Visit me on the Interweb Thingie: http://glynor.com/

MrC

  • Citizen of the Universe
  • *****
  • Posts: 10462
  • Your life is short. Give me your money.
Re: How to Automatically Delete or Remove Empty or Orphaned Folders?
« Reply #13 on: March 02, 2012, 01:36:59 pm »

These are files created by Windows Explorer (and maybe some of them by iTunes).  They are hidden by default.

Both the desktop.ini and the cover art JPGs are common "lockers" of folder in Windows.  Sometimes you have to reboot to get Windows Explorer to release them.

I believe you meant to say these are created by WMP:

   AlbumArt_{E6EF59ED-044C-4A59-BFEB-CA2E5890CC01}_Large.jpg
   AlbumArt_{E6EF59ED-044C-4A59-BFEB-CA2E5890CC01}_Small.jpg
   AlbumArtSmall.jpg

which will also create Folder.jpg too, when it is set to download album art.
Logged
The opinions I express represent my own folly.
Pages: [1]   Go Up