Filepath is too long - can't edit the asset

BrianPacos

Creator, BMP Trainz
I am having a problem I have never seen before in CM. When I go to open an asset for editing, it tells me "<kuid:XXXXX:XXXXX> : Filepath '(a really long filepath)' is too long" and won't let me open the asset for editing so I can cut down the folder name. It's not a folder that the asset relies on, it's just something extra stored in the asset for later use so the asset works fine currently but it appears I won't ever be able to edit the asset when the time comes to do so (basically I have a folder inside the asset file that has a really long name that's affecting my ability to edit the asset). How can I get around this issue? I already have long file paths enabled in Windows so I'm thinking it's a Trainz issue but I'm not sure. Been playing this game for more than 10 years and I've never seen this come up before. I can't even export the asset to a CDP and re-install it to see if I can trick CM into letting me edit the asset to fix this. What's even weirder is that this problem came up "all of the sudden", as this was a condition that's existed in this asset for probably years and it just started giving me a hassle about it now. In fact, I remembered a couple other assets that had the same condition present (where I had long folder names within the asset) so I went into those and changed the name so I didn't run into this problem with those, and it still let me edit them. Really scratching my head here. TRS22 is completely up to date but this didn't happen right after any patches or bug fixes.
 
You mention a very long path, how long is it? I believe the limit for Windows is 260 characters. I see the Google AI is telling me that can be extended up to 32,767 characters by enabling the win32 long paths setting via registry or group policy. I ran into this at work once, when some users complained they were running into a problem. For paths they were using multiple long descriptions instead of simple words, and their paths were huge! Sounds like you have already enabled long paths. I think one way we resolved it was to use robocopy to copy the files out to a shorter path somehow, but I can't recall exactly how we were able to do it. Maybe something like robocopy (Really long path)\* to (short path)\* or something? Anyway, try looking up that command, because it is capable of handling very long paths.
 
Okay, PLEASE STOP RESPONDING. CDP Explorer doesn't work on files that aren't CDP's. I am deleting this forum and posting again - please stop weighing in as you are spamming solutions that don't apply.
A few pointers although I note that you have been around long enough to know the ropes.

Posting in these forums, especially when you start a new thread, is an open invitation for all sorts of responses, related to your topic or not. You have no control over that.

Do not assume that everyone who reads your post also has exactly the same issue as you do. Often a post or a response will trigger other posts on a similar matter, sometime with a very tenuous link to your original post. Deleting your post(s) can prevent others from gaining information that they may need.

Only the moderators can delete or lock a thread. While you can delete your personal posts (as @weeder did in post #2 above) the moderators have the ability to fully restore them.
 
Back
Top