I can confirm that sometimes it works when filenames are short (I think). It’s most likely some path length limit:
@echo off
setlocal enabledelayedexpansion
cd /d "%~dp0"
set "base_path=%~dp0"
"E:\Program Files\NVIDIA Corporation\NVIDIA Texture Tools\nvcompress.exe" -bc2 -highest -mipfilter kaiser -min-mip-size 2 "E:\DESKTOP\tgaaa\001_Enhance Big UI Textures\004_Enhanced_Upscaled_PNG\Topaz_Low_Res" "E:\DESKTOP\TestOutputFolder" > nvcompress_LOG.txt
This path length was “only” 146, so not even close to MAX_PATH.
nvcompress_LOG.txt:
NVIDIA Texture Tools 3.2.3 - Copyright NVIDIA Corporation 2007 - 2023
CUDA acceleration ENABLED. nvtt::Context() time: 0.100 seconds
NVTT Error: I/O error opening the file at E:\DESKTOP\tgaaa\001_Enhance Big UI Textures\004_Enhanced_Upscaled_PNG\Topaz_Low_Res\icon_formation_convoy_stone-gigapixel-low_res-scale-4_00x.png
The output becomes 509 files with a gigantic size of 63,6 KB (65 152 bytes).
In this example I used the absolute path, but it’s exactly the same effect when using a relative path.
Generally, I workarounded it by using my C++ program that accepts arguments and does other operations for me. It calls nvcompress.exe in loop, using threads pool, so I utilize 100% of CPU. With C++20 it’s very easy to set up multithreading. Additionally I also check if the input texture size is valid for the game, auto-rename the output file, etc.
EDIT:
Same thing with a shorter path:
"E:\Program Files\NVIDIA Corporation\NVIDIA Texture Tools\nvcompress.exe" -bc2 -highest -mipfilter kaiser -min-mip-size 2 "E:\DESKTOP\input" "E:\DESKTOP\output" > nvcompress_LOG.txt
NVTT Error: I/O error opening the file at E:\DESKTOP\input\icon_formation_convoy_stone-gigapixel-low_res-scale-4_00x.png
And same thing with just:
"E:\Program Files\NVIDIA Corporation\NVIDIA Texture Tools\nvcompress.exe" -bc2 -highest -mipfilter kaiser -min-mip-size 2 "input" "output" > nvcompress_LOG.txt
So most likely filenames.
I uploaded this PNG in case you wanted to give it a try:
file.zip (162.2 KB)
EDIT: I just noticed that a new version has been released. However, the same issue persists.