Can't delete Recycle Bin

Joined
Sep 13, 2007
Messages
17,829
Location
Northern VA suburb of Washington, DC
  • Thread Starter Thread Starter
  • #41
Since Windows Vista, when a file is moved to the recycle bin, Windows renames the actual file $R<random>.original extension. It also creates a sidecar file named $J<same random>.original extension. The side car file holds the original path and name, date deleted and logical size of the file that was moved to the recycle bin. In order to determine the original name of the $R file, you need the respective $J file.
That certainly explains a lot. Thanks!

To follow up on that, even though Windows was displaying the thumbnail and the file's original filename, it couldn't find the file. Bizarre.
 
Joined
Sep 13, 2008
Messages
535
Location
Viera, FL
Thumbnails are stored apart from the files. Thumbnails are stored in .db files located at C:\Users\{UserName}\AppData\Local\Microsoft\Windows\Explorer

The thumbnails are stored in one of 4 files depending on their size (small, medium, large, extra large) as set in Windows Explorer. These files containing the thumbnails are named according to the maximum pixel size of the thumbnails –
thumbcache_32.db thumbcache_96.db thumbcache_256.db thumbcache_1024.db. Digital forensic examiners routinely look to these thumbcache files for evidence of previous existing files and evidence that a person was aware a file/files were present, especially in ICAC/CSAM (Internet Crimes Against Children/Child Sexual Abuse Materials) Investigations.

So, my arm-chair throw from the couch, and without examining your drive, it would appear that some type of corruption in the NTFS journals or index buffer(s) for the Recycle Bin folder occurred. Windows Explorer could still pull the thumbnail image from the thumbcache, the file name from the $J file but could not locate or read the $R file, and the $R is the actual file that was moved to the Recycle Bin.

Have you run CHKDSK over the drive or any 3rd party utilities that check the integrity of the NTFS file system?
 
Joined
Sep 13, 2007
Messages
17,829
Location
Northern VA suburb of Washington, DC
  • Thread Starter Thread Starter
  • #46
I think the clue lies with which program you were using to process NEF files at the time of your latest issue. I suspect some kind of bug in it. What was it?
The first program that touched the image files was my cataloging software. It downloaded them from the memory card to the computer, imported them into its database, and changed and added information in the metadata. I assume it invokes the pertinent Windows command to copy the files to the computer. However, the image file is never altered when metadata is changed; only the XMP file is created and altered. Helicon Focus then loaded the image files but didn't make any changes to them, at least I don't think it makes any changes. Last, my cataloging software moved the files to the Recycle Bin and that is done I again assume by invoking the pertinent Windows command. I mention that last step because I suppose it's possible that the files became corrupt upon moving them to the Recycle Bin, though that's highly doubtful.

Throughout that process, note that no program should have altered the image files. Also consider that if my cataloging software or Windows somehow managed to corrupt the image files in the first step, that corruption didn't prevent Helicon Focus from loading and processing the image data.

EDIT: When my cataloging software imports the image files, it also renames them. Am I correct that that's done by changing only the XMP file, not the image file? The pertinent Preference setting instructs the software to never write catalog information to the raw file.
 
Last edited:

Growltiger

Administrator
Administrator
Joined
Apr 26, 2008
Messages
12,960
Location
Up in the hills, Gloucestershire, UK
What is this cataloguing software?
I don't think you can assume the image file ever got corrupted. More likely the cataloguing software has somehow managed to lock files that are in the Recycle Bin.
 
Joined
Jan 13, 2006
Messages
4,718
Location
Columbia, Maryland
Real Name
Walter Rowe
EDIT: When my cataloging software imports the image files, it also renames them. Am I correct that that's done by changing only the XMP file, not the image file? The pertinent Preference setting instructs the software to never write catalog information to the raw file.
You would have to look at the raw files on disk, but I suspect the cataloging software is renaming the actual raw files. That alone would not change the contents of the files. As with the other file operations you mentioned it should be using the normal filesystem functions of the Windows operating system. I see no reason to suspect any of your software.
 
Joined
Sep 13, 2007
Messages
17,829
Location
Northern VA suburb of Washington, DC
  • Thread Starter Thread Starter
  • #50
More likely the cataloguing software has somehow managed to lock files that are in the Recycle Bin.
I was able to delete all of them though not in one batch process. I don't know the attributes of a "locked" file, but I would think the pertinent restrictions would apply whether using a batch process or not.

I also thought some more about this: I was able to delete the files from the physical folder structure (the deletion that automatically moves them to the Recycle Bin). It was only when the files were in the Recycle Bin that I had trouble deleting them. That leads me to think the problem is not being caused by the software that comes in touch with the files.
 
Joined
Sep 13, 2007
Messages
17,829
Location
Northern VA suburb of Washington, DC
  • Thread Starter Thread Starter
  • #51
Basically, open an Administrator Command Prompt, enter chkdsk C: /f and it will run and automatically fix any issues it finds.
I did that and though the information was running by too fast to comprehend, it clearly reported that some things were fixed.

I then displayed the contents of the Recycle Bin. Though I had earlier tried unsuccessfully to delete about 140 files, miraculously about half of them were gone. I then successfully deleted the remaining files in one batch process.

I'll continue to update the thread until doing so seems pointless.
 

Growltiger

Administrator
Administrator
Joined
Apr 26, 2008
Messages
12,960
Location
Up in the hills, Gloucestershire, UK
I did that and though the information was running by too fast to comprehend, it clearly reported that some things were fixed.

I then displayed the contents of the Recycle Bin. Though I had earlier tried unsuccessfully to delete about 140 files, miraculously about half of them were gone. I then successfully deleted the remaining files in one batch process.

I'll continue to update the thread until doing so seems pointless.
Back in message 4 you confirmed that you had already checked the disk integity and it was OK. (The check you did does the same as chkdsk).
 

Growltiger

Administrator
Administrator
Joined
Apr 26, 2008
Messages
12,960
Location
Up in the hills, Gloucestershire, UK
A file is locked when a program is working on it. Bad programming can leave a file locked after the program has finished with it. There is specialist software that can unlock locked files and reveal which program is keeping a file locked. Being locked is not an attribute that you can simply change. I am suspicious of your cataloguing software.

Does your cataloging software run in the background? Or startup when you switch on? If so it could retain locks on files.
 
Last edited:
Joined
Sep 13, 2007
Messages
17,829
Location
Northern VA suburb of Washington, DC
  • Thread Starter Thread Starter
  • #55
I am suspicious of your cataloguing software.
I just now thought of somewhat of a test that I can do: Rather than use my cataloging software to delete files from the physical folder system (the deletion that automatically sends them to the Recycle Bin), I'll use Windows. If when doing that I can always then delete files from the Recycle Bin, that would make me suspicious of the cataloging software.

Using that method to send files to the Recycle Bin will require an extra step of having to remove information pertaining to those files from the catalog's database, but it's just one extra step that might prove to be worthwhile to figure out what's going on.
 
Joined
Oct 15, 2008
Messages
2,365
Location
GA
I'll throw in another suggestion...import the files from your memory card to their stored location using Windows vs. directly through the catalog software. Battered wife syndrome for me, but I don't like any software messing with external drives, especially flash media because of how they work with files. I've seen way too many corrupted flash media in my days to know that the best way to handle anything with them is to let either the camera write to them (i.e. process a photo) or let your computer's operating system interact with them (i.e. windows/mac copying/pasting files only). Everything else would be done locally.

I'm sure that messes with workflows and such, but you'll need to figure out which part of this is more important. An altered workflow or dealing with these types of technical issues that so far span about a week.
 
Joined
Sep 13, 2007
Messages
17,829
Location
Northern VA suburb of Washington, DC
  • Thread Starter Thread Starter
  • #57
import the files from your memory card to their stored location using Windows vs. directly through the catalog software.
I have no problem deleting files at any time until they have been sent to the Recycle Bin. That makes me highly doubtful that there is something about the import process that is messing something up. Even if I did use Windows to transfer the images to the computer, I would still need to import them into the catalog before sending them to the Recycle Bin.

I'm sure that messes with workflows and such, but you'll need to figure out which part of this is more important. An altered workflow or dealing with these types of technical issues that so far span about a week.
It's easy for me to deal with this technical issue. That's because I need to reboot every once in awhile for other reasons and that's when I can use the Command Prompt to empty the Recycle Bin. Not so easy for changing the workflow because everything about the workflow is centered on the catalog.
 
Joined
Oct 15, 2008
Messages
2,365
Location
GA
You mentioned the import process is also renaming files as well, yes? So my guess here is your catalog software does some alteration of the original file on the media, renames, imports, stores, and may be leaving artifacts behind and/or introducing new ones during the import process.

I'd give it a try either way, assuming you're still looking for suggestions.
 
Joined
Sep 13, 2007
Messages
17,829
Location
Northern VA suburb of Washington, DC
  • Thread Starter Thread Starter
  • #59
I'd give it a try either way, assuming you're still looking for suggestions.
I'm always open to suggestions until I reach the point in time that I don't want to bother messing with this issue any longer. I haven't reached that point. However, I'm not willing to so strongly change my workflow when the current workaround is so easy and effective.

There is no point in removing the import process from my workflow. That's because there is no point in having the cataloging software if I don't import the images into its catalog.
 
Joined
Oct 15, 2008
Messages
2,365
Location
GA
You would still import it to your catalog, you would just import it from C:/Pictures/2020/08/Birds vs. E://DCIM/Media after you copy/paste from media to your local drive.
 
Links on this page may be to our affiliates. Sales through affiliate links may benefit this site.
Nikon Cafe is a fan site and not associated with Nikon Corporation.
Forum post reactions by Twemoji: https://github.com/twitter/twemoji
Copyright © 2005-2019 Amin Forums, LLC
Top Bottom