Welcome, Guest
General discussion about ComicRack

TOPIC: Fixing cbz.tmp files caused by moving hard drive to external enclosure

Fixing cbz.tmp files caused by moving hard drive to external enclosure 1 year 1 month ago #46163

  • iridius
  • iridius's Avatar
  • Offline
  • Fresh Boarder
  • Posts: 2
  • Karma: 0
My desktop motherboard died on me this past week. So I moved my internal harddrive containing comic books (L:\) (not the system drive) from the desktop to an external enclosure (technically a USB Docking Station) connected to my laptop.

I still had a few thousand comics in the Files to update Smart List so I did File->Update all Book Files since I don't have the automatic update option set. However, after a few hours I got a message saying my laptop internal hard-drive (C:\) had run out of space. This made no sense as it had about 500GB, so I researched and found that the files that were updating, instead of updating and staying on the now external L:\ drive, had been moved (I don't know if the updates had been added or not) but they were moved to the following location:
c:\Users\david\AppData\Local\VirtualStore\Program Files\ComicRack\Scripts\
there are all the comic files (all .cbz) and all have original file name.cbz.tmp for example

Y- The Last Man 059.cbz.tmp

These files were in various directories on the L:\ drive, which was a little organized, and now they're just clumped into the above named Scripts directory. Both desktop and laptop are Windows 10 64-bit. First I tried adding permissions for full access to all users, that did not fix it, then I removed read only check for all folders and subfolders files, that did NOT work. Finally I set compatibility of ComicRack to run as administrator (that seems to have stopped the problem). I don't know why this is needed while on the desktop I never had to choose that option. Both accounts on desktop and laptop are administrator accounts anyway, but that doesn't seem to be enough.

I now face an issue that I have thousands of orphaned files (all the cbz.tmp files in the Scripts directory on the C:\ drive on my laptop) and I want them on the external L:\ drive. I assume I could just move them and mass remove the .tmp extension and readd them to my library.

Now that I have the permissions issue fixed, I am running the Update all Comic Files command successfully and I see that as a file is active in the Background Tasks -> Write Information section it is temporarily stored in the c:\Program Files\ComicRack\Scripts\ directory, so I assume what happened is that after that it would go to the L:\ drive, but since ComicRack couldn't right to that drive, it kept it as a .tmp file and moved it to the c:\Users\david\AppData\Local\VirtualStore\Program Files\ComicRack\Scripts\ directory, what I don't understand is:
1. Why move it to a hard-to-find hidden system directory instead of just leaving it in the c:\Program Files\ComicRack\Scripts\ directory.
2. Why leave it as a .tmp file, if the info has been added then convert it back to the original .cbz file. Which might mean that the update was never actually written, but the smartlist count number decreased, so I don't know what to think about that.

I want to figure out best practices for this issue.

3. I wanted to filter out all the comics that have big red X as State, in other words all the comics that were moved and now are in the library but the files are not accessible. I saw that there was a user script before for this FilesNotFound, but none of the links to a .crplugin file version of it work, and all I can find is a .py and .ini file for it, but I can't seem to get them to work or show up when I try to make a smartlist. I have done this with another user script file, ProposedValues and it works fine, but I was able to find the .crplugin file for that one. Is there a way to get the .py and .ini file to work or can anyone share the .crplugin file with me or point me to it.

4. Is there a way to relink these files to the library, I know that they are all cbz so should have any metadata stored in them, opening a few does confirm the existence of comicsInfo.xml I am just wondering what my best step is to avoid messing anything up.

5. Is there a way to get them back into the directories they were in, in the library if I go to each comic's Info option and then Summary tab next to Where: it shows the original location correctly. Is there a way to get them back to there?

Hope I was detailed enough, but not to pedantic.
Thanks in advance
The administrator has disabled public write access.

Fixing cbz.tmp files caused by moving hard drive to external enclosure 1 year 1 month ago #46180

  • jkthemac
  • jkthemac's Avatar
  • Offline
  • Platinum Boarder
  • Posts: 766
  • Thank you received: 253
  • Karma: 55
Virtual store is reserved for the operating system when it does not have the expected permissions to update the file in the original location. This issue has raised its head lots of times in many ways since Windows 10 came along because it seems to use permissions differently, or has a buggy component that confuses the permissions system. (See for example the many 'Comic Files disappearing' threads.)

Either way you would probably be best advised to put all the files back where they were.

Do you have a version of your database from before you tried to update these files because if you do there is a simpler way to do this. Otherwise you may have some issues.

One thing you could try is making a smart list for all the files that don't have a recognised location and then use search and replace on the location field if it is useable but this is all so contextual to exactly what your database contains. For example if you manually open the info for a file that appears to be missing where does the info think the file is? Because for example, you could manually copy all of the files back to their original location but that would probably take a long time. You would be better off making a single folder and moving them all there and then using some search and replace rules. The last thing you want is them cluttering up your C drive.

One thing that may help is if you used library organiser to put these in their original places. If you did you have much less work to do. If not you could potentially use it to tidy them up once you have used search and replace.

First things first give me some specific examples of what the info says and what kind of file structure you were using.
Last Edit: 1 year 1 month ago by jkthemac.
The administrator has disabled public write access.

Fixing cbz.tmp files caused by moving hard drive to external enclosure 1 year 1 month ago #46182

  • boshuda
  • boshuda's Avatar
  • Offline
  • Gold Boarder
  • Posts: 295
  • Thank you received: 64
  • Karma: 8
Have you tried simply updating the directory of the files in the comicrackdb xml file? Obviously make a backup first...
The administrator has disabled public write access.

Fixing cbz.tmp files caused by moving hard drive to external enclosure 1 year 1 month ago #46261

  • iridius
  • iridius's Avatar
  • Offline
  • Fresh Boarder
  • Posts: 2
  • Karma: 0
jkthemac wrote:
Virtual store is reserved for the operating system when it does not have the expected permissions to update the file in the original location. This issue has raised its head lots of times in many ways since Windows 10 came along because it seems to use permissions differently, or has a buggy component that confuses the permissions system. (See for example the many 'Comic Files disappearing' threads.)

Okay, that explains the original issue better, yay, why do I always fall for the upgrade now, schemes....smh.

Either way you would probably be best advised to put all the files back where they were.
They haven't moved, in the sense that they are still on the same hard-drive and have the same hierarchy, but my desktop is toasted and will not even recognize itself for a POST, I think I fried the Motherboard. So, to put them back where they were, doesn't solve the problem because I can't boot that computer.
Do you have a version of your database from before you tried to update these files because if you do there is a simpler way to do this. Otherwise you may have some issues.
No, I don't have a pre-update version.
One thing you could try is making a smart list for all the files that don't have a recognised location and then use search and replace on the location field if it is useable but this is all so contextual to exactly what your database contains. For example if you manually open the info for a file that appears to be missing where does the info think the file is? Because for example, you could manually copy all of the files back to their original location but that would probably take a long time. You would be better off making a single folder and moving them all there and then using some search and replace rules. The last thing you want is them cluttering up your C drive.
I made a smart list, but I don't know the syntax for "Unrecognized Location" I tried: Locations is BLANK to no avail, what would you recommend?



Have you tried simply updating the directory of the files in the comicrackdb xml file? Obviously make a backup first...
No, because all the files were renamed (at least the extension was changed), so if anything, I would mass rename the extensions first and then just move them to my comic folder again, but I am trying to figure out if they are the updated version (since I was running comicvine scraper on them, or the old version), I guess if they are the old version, it doesn't matter because I will have to rescrape them anyway.

Thanks for the help,
The administrator has disabled public write access.

Fixing cbz.tmp files caused by moving hard drive to external enclosure 1 year 1 month ago #46262

  • boshuda
  • boshuda's Avatar
  • Offline
  • Gold Boarder
  • Posts: 295
  • Thank you received: 64
  • Karma: 8
Sorry, I didn't read your original post all that closely.

If you want to try Pescuma's FilesNotFound script, go to your %appdata%\cYo\ComicRack\Scripts directory, create a directory called Files Not Found, and put the .py and .ini files in there. Restart ComicRack. It should pick it up and allow you to create a smart list with it.

Edit: I packaged the script up. Install it like normal (Drop it onto your running ComicRack or double-click it and ComicRack should start it up and install it).

File Attachment:

File Name: Filesnotfo...crplugin
File Size:1 KB
Last Edit: 1 year 1 month ago by boshuda.
The administrator has disabled public write access.
Time to create page: 0.178 seconds

Who's Online

We have 389 guests and 5 members online