# KONTAKT question: What's so dangerous with batch resave?



## SimonViklund (Feb 19, 2018)

Every time you click "batch resave" in KONTAKT, this warning message comes up (see the attached image). Among other things, it says "You should only do it if you know exactly what you're doing!!" complete with the double exclamation marks.

Now, in order to do a batch resave you just point KONTAKT to the main folder of a KONTAKT instrument and *boom* it performs a batch resave of that entire KONTAKT instrument, which makes it load faster in the future. Is there anything else to it?

What could go wrong when you do a batch resave? Why is this warning message so seriously worded? Have I missed something?


----------



## SimonViklund (Feb 19, 2018)

This might be the wrong subforum for this questions. Maybe a mod could move this thread to the "Newbie Questions" subforum or something. Sorry for the hassle.


----------



## leon chevalier (Feb 19, 2018)

Actually, I would like to know as well!


----------



## EvilDragon (Feb 19, 2018)

Basically, if you don't know what you're doing, you could select a whole overarching folder containing LOTS of libraries... then the end result can be any or all of these:

* batch resave taking way too long to complete
* throwing random errors if some NKIs are of newer version than the version of Kontakt you're currently running
* if (unlikely, but not impossible) two libraries have some samples with identical filenames, the first one stumbled upon would be used for all instances of that filename - which screws up how some of those instruments will sound. There's an option to verify duplicate files, but that takes even longer to complete then. 

If you're doing batch resave one by one library at a time, you don't have anything to worry about because in that case you know _exactly_ what you're doing (and how it's supposed to be done).


----------



## ScoringFilm (Feb 19, 2018)

And ensure that you save a copy of the NKIs prior to batch resave (just in case)!


----------



## SimonViklund (Feb 19, 2018)

EvilDragon said:


> Basically, if you don't know what you're doing, you could select a whole overarching folder containing LOTS of libraries...


Ok, but it feels like N-I should be able to program the batch resave function to determine whether the user has actually pointed to an instrument folder (by finding .nkc/.nkr files or something) or if the user has made a mistake and pointed to a parent folder containing several instrument subfolders. But thanks for the answer! Very informative.


----------



## EvilDragon (Feb 19, 2018)

That is an absolutely valid comment, except a library can have more than one NKR file so that's not a defining factor for what a library entails. They can only check for .nicnt (or previously _info.nkx) files to check if it's a valid Kontakt Player library... for non-KP stuff it is much less clear cut. Some old non-KP libraries don't even have an NKR... So you can see how this is not really something easy to do. Or even feasible.


----------



## SimonViklund (Feb 19, 2018)

Yeah it's just the way batch resave is implemented now, it feels like N-I kind of says "hey here's this function we haven't made entirely user friendly and can't really take full responsibility for, so here's a warning message and now you're on your own!" N-I should really have a standard for file/folder structure or there should be some index file in the root folder of each instrument that KONTAKT can use to determine exactly what instrument(s) it is, etc.

Is there a reason why libraries aren't batch resaved (or that the user is automatically offered to do so) when they're installed or the first time you open them in KONTAKT or something?

Is there a downside to batch resave?

Can't all libraries be batch resaved?

What happens if you batch resave the same library twice?


----------



## MA-Simon (Feb 19, 2018)

I also had (or imagine) an error, were if you batch resave and the samples missing dialog comes up, (and you were to ignore that) it resaves the patch with the samples missing. So It effectively deletes these samples from the .nki and will never ask again.

I also had libraries with samples named the same, so it could get screwed up if you select more then one library.

There are no downsides.



SimonViklund said:


> Can't all libraries be batch resaved?


Yes (but not at the same time, obviously)


SimonViklund said:


> What happens if you batch resave the same library twice?


Nothing, if you move a library to another drive or location, you should even batch resave it again, because they are now stored in a different place on your harddrive


----------



## EvilDragon (Feb 19, 2018)

MA-Simon said:


> if you move a library to another drive or location, you should even batch resave it again, because they are now stored in a different place on your harddrive



Nope. Batch resave has nothing to do with different hard drives, it only fixes _relative paths between NKIs and samples. _These relative paths don't change if you simply move the whole library folder to another drive (or even on another location on the *same *drive)!


----------



## MA-Simon (Feb 19, 2018)

EvilDragon said:


> Nope. Batch resave has nothing to do with different hard drives, it only fixes _relative paths between NKIs and samples. _These relative paths don't change if you simply move the whole library folder to another drive (or even on another location on the *same *drive)!


Well... you never stop learning, thanks!


----------



## SimonViklund (Feb 19, 2018)

This thread is very informative!


----------



## SoNowWhat? (Feb 19, 2018)

@EvilDragon , bringing light to the dark arts of IT since...well for as long as I’ve been lurking on VI forums. Many thanks sir.


----------



## erica-grace (Feb 19, 2018)

EvilDragon said:


> Basically, if you don't know what you're doing, you could select a whole overarching folder containing LOTS of libraries... then the end result can be any or all of these:
> 
> * batch resave taking way too long to complete
> * throwing random errors if some NKIs are of newer version than the version of Kontakt you're currently running
> * if (unlikely, but not impossible) two libraries have some samples with identical filenames, the first one stumbled upon would be used for all instances of that filename - which screws up how some of those instruments will sound. There's an option to verify duplicate files, but that takes even longer to complete then.



Well, maybe the error message should say that instead!


----------



## EvilDragon (Feb 19, 2018)

That's too much info to read in a dialog window.


----------



## erica-grace (Feb 20, 2018)

Really small font?


----------



## evilantal (Feb 20, 2018)

I've found that it's not so much the danger of non-unique sample names, but the names of the resource container files.
Many developers (especially of free libraries) tend to give these generic, default or non-descriptive names.
Doing batch resave on many folders at once will then result in several libraries using the same resource files. Obviously resulting in corrupt graphcs and whatnot.

One folder at a time is the way to go. Or, even better, doing a batch resave on each new library the moment you copy/install it on your production system.


----------



## EvilDragon (Feb 21, 2018)

evilantal said:


> I've found that it's not so much the danger of non-unique sample names, but the names of the resource container files.



Also a very good point!


----------



## galactic orange (Feb 22, 2018)

Great thread! Related question:

Is there any disadvantage to using batch re-save on a kontakt library on an external drive which is SHARED by two (or multiple) different systems?

Example: On my home studio computer I batch re-save the files in Kontakt. Then later I plug in the same external drive to my laptop, fire up Kontakt and batch re-save the same files on my laptop. Is this redundant? Recommended?


----------



## EvilDragon (Feb 22, 2018)

Yes, that's redundant.


----------



## husker (Jan 6, 2019)

Question on batch resaving libraries. What exactly is it changing? Something within the library folder structure? Something in Kontakt?

For example, if I have libraries on the D:\ drive that are batch resaved. I then rebuild my computer from scratch, and reinstall Kontakt. Would I need to redo the batch resave? Or not, since D:\ wasn't touched during the rebuild.


----------



## Shad0wLandsUK (Jan 6, 2019)

husker said:


> Question on batch resaving libraries. What exactly is it changing? Something within the library folder structure? Something in Kontakt?
> 
> For example, if I have libraries on the D:\ drive that are batch resaved. I then rebuild my computer from scratch, and reinstall Kontakt. Would I need to redo the batch resave? Or not, since D:\ wasn't touched during the rebuild.


As I understand it, the batch-resave element is only taking place between the instrument files (nki’s) and the samples (nkx’s). So removing Kontakt and the application files accosiated with it will not affect this change.

I believe the process relinks the samples with the instrument files according to the directory hierarchy (layout of the folders and files) within the library itself!

@EvilDragon will be able to correct me on this though


----------



## kavinsky (Jan 6, 2019)

EvilDragon said:


> If you're doing batch resave one by one library at a time, you don't have anything to worry about because in that case you know _exactly_ what you're doing (and how it's supposed to be done).


Imperfect Samples managed to name different mic positions with the same filenames (they were located across different folders)
But thats the only developer I know of that has done something like this


----------



## Jimmy Hellfire (Jan 6, 2019)

kavinsky said:


> Imperfect Samples managed to name different mic positions with the same filenames (they were located across different folders)
> But thats the only developer I know of that has done something like this



It's not a bug, it's a feature. It's called "imperfect samples" for a reason.


----------



## EvilDragon (Jan 7, 2019)

Shad0wLandsUK said:


> I believe the process relinks the samples with the instrument files according to the directory hierarchy (layout of the folders and files) within the library itself!
> 
> @EvilDragon will be able to correct me on this though



Batch resave doesn't care about folder hierarchy at all. Just finds samples with correct names and relinks their paths in the NKI. Doesn't care about where the sample is as long as it's within the folder you've pointed batch resave at.

As mentioned before, if there's duplicate filenames in the library folder, things can get messed up pretty badly, since batch resave will only look for the first instance of the filename and relink all references to THAT. Which means that those Imperfect Samples libraries WILL get messed up too. There are other cases where this was also done (some older ISW libs, for example). It's not a good thing to do - all samples should have unique filenames.



husker said:


> Would I need to redo the batch resave? Or not, since D:\ wasn't touched during the rebuild.



You won't need to do anything in that case.


----------



## husker (Jan 7, 2019)

Thank you.


----------



## puremusic (Jan 7, 2019)

This has been instructive. I tend to batch resave instrument library by instrument library as I feel I need it, ie if the loading speed bothers me. I was wondering if it would be safe to just all at once aim it at my entire Kontakt folder to get it done. Now I know what could've gone wrong if I had tried that...


----------



## artomatic (Jan 7, 2019)

galactic orange said:


> Great thread! Related question:
> 
> Is there any disadvantage to using batch re-save on a kontakt library on an external drive which is SHARED by two (or multiple) different systems?
> 
> Example: On my home studio computer I batch re-save the files in Kontakt. Then later I plug in the same external drive to my laptop, fire up Kontakt and batch re-save the same files on my laptop. Is this redundant? Recommended?






EvilDragon said:


> Yes, that's redundant.




@EvilDragon 
So, in this scenario, how does one Kontakt (non batch re-save) installed on a laptop, works just like the Kontakt (with batch re-save) on a desktop computer? I mean shouldn't the laptop's Kontakt also require batch re-save to the same external drive so that it'll load the libs faster as well?


@galactic orange 
Did this work for you, not having to batch re-save the files on your laptop?


Thanks, you guys!


----------



## galactic orange (Jan 7, 2019)

artomatic said:


> @galactic orange
> Did this work for you, not having to batch re-save the files on your laptop?
> 
> 
> Thanks, you guys!



Since EvilDragon gave the advice that it's redundant to do a batch re-save on the second computer, I didn't try it. If I had a faster laptop then it would be worth a shot, but it's a mid-2009 MBP Core2Duo system and doing a batch re-save on my roughly 3TB of sample libraries would take so much time that I'd rather not deal with it. That being said, I did get one of the new 2018 Mac Minis, but haven't bothered with a batch re-save on that system either. I suppose I could run some before/after comparisons. But then again I don't know how much the loading speed improvement would be due to the batch re-save or to the increased processing power, amount of RAM, RAM speed, SSD speed, etc. of the newer Mini.


----------



## EvilDragon (Jan 8, 2019)

artomatic said:


> So, in this scenario, how does one Kontakt (non batch re-save) installed on a laptop, works just like the Kontakt (with batch re-save) on a desktop computer? I mean shouldn't the laptop's Kontakt also require batch re-save to the same external drive so that it'll load the libs faster as well?



Because the _relative paths from the NKIs to samples are the same_ if you move the whole library folder over to another machine.


----------



## Lode_Runner (Jan 8, 2019)

I'm going to ask a very naïve question - wouldn't developers do the batch resave before compressing to RAR, so that when the library is extracted, the NKI already knows what sample files to look for and where to find them? What changes in the NKI and the Sample Files between the time the library is completed and 'shipped', and when it's installed and run?


----------



## dzilizzi (Jan 8, 2019)

puremusic said:


> This has been instructive. I tend to batch resave instrument library by instrument library as I feel I need it, ie if the loading speed bothers me. I was wondering if it would be safe to just all at once aim it at my entire Kontakt folder to get it done. Now I know what could've gone wrong if I had tried that...


I also misunderstood how to do a batch resave and started to do my entire kontakt folder. But it seemed to be stalled so I canceled it. I then found a Soundiron video on how to do it properly. Wow. What used to take 10 minutes to load is almost instant. I'm slowly going through all my libraries (though I will ignore the imperfect samples one - thanks!) It does take a while, but it is definitely worth it.


----------



## dzilizzi (Jan 8, 2019)

Lode_Runner said:


> I'm going to ask a very naïve question - wouldn't developers do the batch resave before compressing to RAR, so that when the library is extracted, the NKI already knows what sample files to look for and where to find them? What changes in the NKI and the Sample Files between the time the library is completed and 'shipped', and when it's installed and run?


Well, you can't do it while they are in RAR form, and I'm guessing, since most downloads separate the instruments from the samples, the batch resave breaks with the separation. Or during the unpacking.


----------



## EvilDragon (Jan 8, 2019)

Lode_Runner said:


> I'm going to ask a very naïve question - wouldn't developers do the batch resave before compressing to RAR, so that when the library is extracted, the NKI already knows what sample files to look for and where to find them?



Developers are doing that, but that's not the issue here. The issue is if a library was created on Mac, but then opened on Windows (or vice versa), loading is going to be a bit longer due to a certain gremlin in NKC files (only applicable to KP libraries).

Nothing really changes in the library from the moment it's packed and shipped to the moment it's installed - as mentioned above, if the library is done properly, all the paths to samples written in NKI files are relative, not absolute. But first-time load of the library can take a bit longer than usual.



dzilizzi said:


> and I'm guessing, since most downloads separate the instruments from the samples, the batch resave breaks with the separation. Or during the unpacking.



Nope. See above.


Also read this - peculiarities of batch resave are best explained here: http://www.syntheticorchestra.com/blog/?17


----------



## Lode_Runner (Jan 8, 2019)

EvilDragon said:


> Developers are doing that, but that's not the issue here. The issue is if a library was created on Mac, but then opened on Windows (or vice versa), loading is going to be a bit longer due to a certain gremlin in NKC files (only applicable to KP libraries).
> 
> Nothing really changes in the library from the moment it's packed and shipped to the moment it's installed - as mentioned above, if the library is done properly, all the paths to samples written in NKI files are relative, not absolute. But first-time load of the library can take a bit longer than usual.


Thanks EvilDragon, the depth of your knowledge is always very appreciated.


----------



## artomatic (Jan 8, 2019)

EvilDragon said:


> Because the _relative paths from the NKIs to samples are the same_ if you move the whole library folder over to another machine.



So appreciate you sharing your in-depth knowledge on this - and in many other areas.
Much grats!


----------



## paoling (Jan 8, 2019)

Another issue is that if you use multiple Kontakt versions on your system, by batch resaving in the most recent one you won't be able to load the patches in the previous versions of Kontakt.


----------



## kurtvanzo (Jan 8, 2019)

paoling said:


> Another issue is that if you use multiple Kontakt versions on your system, by batch resaving in the most recent one you won't be able to load the patches in the previous versions of Kontakt.



This is exactly why you must be very careful about what version you use to batch resave (thanks Paoling!). I often batch resave in standalone just so I know what version it is resaved with. After resaving your patches won't open in older versions. Hugely important if your creating instruments for others to use (Saving as... or batch resaving).


----------



## EvilDragon (Jan 8, 2019)

kurtvanzo said:


> I often batch resave in standalone just so I know what version it is resaved with.



You can do it from the plugin, there's no difference. You click the KONTAKT logo in top left or NI logo in top right and you get the version number...


----------



## kurtvanzo (Jan 8, 2019)

EvilDragon said:


> You can do it from the plugin, there's no difference. You click the KONTAKT logo in top left or NI logo in top right and you get the version number...


True. I think it's just easier to use the standalone than replacing the plugin if I want to use an older version, but I have done both.


----------



## Lilainjil (Jan 9, 2019)

Let me add another question to the thread. My writing partner and I share a small project-specific folder of non-Kontakt Player Kontakt instruments via dropbox. It's named Kontakt Instruments Shared. My drive is called 512GB SSD, his is called 1TB HD.
The routine is this: when I boot a Logic session shared from him, Kontakt of course looks for the samples and not finding his "1TB HD", I click on the bottom left box "Keep search mode and selected folders for the current session" then "Browse for folder" then I guide Kontakt to the path to my Kontakt Instruments Shared folder on my "512GB SSD" (specifically Volume/512 SSD/Dropbox/JackandJill/Kontakt Shared Instruments) Then everything eventually loads fine and I'm good to go. So, would there be any advantage or disadvantage to either of us batch re-saving these shared Kontakt instruments? Or would it really mess things up? Anything to smooth over this process would be great.


----------



## EvilDragon (Jan 9, 2019)

You should have the same names of the drives (I assume both of you are on Mac, otherwise you'd be talking about drive letters). So, just have both of your drives with the same names (don't reflect the actual size of the drive in the name), and it should be good from there.


----------



## dreddiknight (Jan 9, 2019)

I am thinking of upgrading my ssd to 2tb, and using it on both my PC desktop and MacBook Pro.

Would a batch resave speed thing up, or mess things up?


----------



## Theodor Andrews (Jan 10, 2019)

Fixing relative paths between NKIs and samples sound quite trivial but it speeds up loading time like hell. A must do on nearly every recent sample library. Great thing everyone must know about!


----------



## Crowe (Jan 10, 2019)

Batch re-saving some of my Komplete plugins didn't seem to do anything. Is that correct, or did it only seem that way?

To be succinct, should you be re-saving NI Komplete libraries too?


----------



## EvilDragon (Jan 10, 2019)

Theodor Andrews said:


> Fixing relative paths between NKIs and samples sound quite trivial but it speeds up loading time like hell. A must do on nearly every recent sample library. Great thing everyone must know about!



That's only relevant if library was done on Mac but you're on Windows (or vice versa). As explained in the blog post from Blake that I linked to 



dreddiknight said:


> I am thinking of upgrading my ssd to 2tb, and using it on both my PC desktop and MacBook Pro.
> 
> Would a batch resave speed thing up, or mess things up?



If you're just moving your libs to another drive, as mentioned before, you don't need to do anything, no need for a batch resave.


----------



## Theodor Andrews (Jan 10, 2019)

EvilDragon said:


> That's only relevant if library was done on Mac but you're on Windows (or vice versa). As explained in the blog post from Blake that I linked to


I see... Thank you!


----------



## jesussaddle (Aug 13, 2022)

Jimmy Hellfire said:


> It's not a bug, it's a feature. It's called "imperfect samples" for a reason.


----------



## jesussaddle (Aug 14, 2022)

I confess that I didn't read every single comment here, forgive me please. But if I'm understanding, the first time you load a library that was done correctly, it may take longer than it will take thereafter. It is not necessary to batch-resave these. The time you batch re-save is either if a dev says to (say if they've created a mac version using Windows or vice versa, and its a Kontakt Player library, or some other unintended problem inherent with the way Kontakt libraries are created by some devs), OR if you have change the file structure between the samples and the .nki (or something like that?) So a rough way of saying it would be that the batch re-save process is making a record (in the .nki or somewhere) so it no longer has to be as slow when it loads the library.

Now, my question is, could there be a way for Native Instruments to have Kontakt "know" and "let the user know" once this process is successfully done (or doesn't need to be done)? Maybe at either the time when the library is first loaded and takes longer), or when a user completes a batch re-save when necessary? 

I'm only saying this because I have recently had to upgrade my computer a few times and adjust my thinking about how much hard drive space I want to devote to music. It doesn't sound like going forward it would be needed that often.

But I wish there was a way to avoid batch re-saving a library where it was already done, or wasn't needed to begin with (for instance Wavesfactory Sharine has been an issue for me in one particular DAW, and my thought was that I needed to batch re-save it). 

To avoid this, I wish there was a check box letting me know that Kontakt feels that it is able to load things "properly" (however they can define that in software code).


----------



## AndreasHe (Nov 30, 2022)

I did a batch-resave on some libs (e.g. AI Nucleus) and something I don't understand happened: in the nicnt file, there are also my other libraries listed. But I selected for batch-resave only the instrument folder. Maybe it has nothing to do with batch resave? But what happened to my nicnt files, caused by what?


For example, what I found in the resulting nicnt file:

`Spitfire Solo StringsVB_shortnameSolo Strings3™7'%Spitfire Solo StringsMST_shortnameSolo Strings4™7)%Spitfire Solo Strings`


----------

