REPOST- CM won't open an asset to edit - "filepath is too long"

BrianPacos

Creator, BMP Trainz
(I am reposting this because a user on the previous thread kept spamming replies that didn't even address the issues in the post and everyone will think it was solved - please use this thread!)

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. 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.
 
Last edited:
I answered on your other post, but the gist of what I mentioned to try is the built-in Windows command robocopy. Robocopy is capable of handling very long paths. I don't recall exactly how we did it, but I think it was just something like robocopy (verylongpath)\* (shorterpath)\*. Anyway, look up that command because it may work for you.
 
I answered on your other post, but the gist of what I mentioned to try is the built-in Windows command robocopy. Robocopy is capable of handling very long paths. I don't recall exactly how we did it, but I think it was just something like robocopy (verylongpath)\* (shorterpath)\*. Anyway, look up that command because it may work for you.
Will that work with the TZARC asset? Because that's the only thing I have to work with right now. I even tried editing the hex code to see if I could manually break into the file to change the folder name to no avail.
 
The major difference with what you mentioned on the other thread is the example you have, you were in File Explorer. I cannot even get there as the only way to do it is by opening it for editing in CM and that's when I get the error, CM won't even open the asset.
 
Where is your data folder located?
The default path is under your profile/App Data/Local/N3V Games/TRS22/Build-something where something equals the random alphanumeric sequence.

If you placed the data folder elsewhere, it's possible that the path where it's located is more than 255 characters causing this error.

If you want to keep the data-folder in that location, you need to do a couple of things, both are really easy and will most likely solve your problem.

Make sure Trainz is closed including the launcher before beginning.

1) Rename the data folder to something smaller and easy to remember such as TRS22_Data.
2) Start up the Launcher.
3) Click on Trainz settings.
4) Click on the Install tab
5) Click on the ...
6) Browse to your newly named data folder and click on it, actually double click and open it is better.

Trainz will want to restart after running the translation table thing.
Your user credentials will be the same and nothing will be lost.
 
Where is your data folder located?
The default path is under your profile/App Data/Local/N3V Games/TRS22/Build-something where something equals the random alphanumeric sequence.

If you placed the data folder elsewhere, it's possible that the path where it's located is more than 255 characters causing this error.

If you want to keep the data-folder in that location, you need to do a couple of things, both are really easy and will most likely solve your problem.

Make sure Trainz is closed including the launcher before beginning.

1) Rename the data folder to something smaller and easy to remember such as TRS22_Data.
2) Start up the Launcher.
3) Click on Trainz settings.
4) Click on the Install tab
5) Click on the ...
6) Browse to your newly named data folder and click on it, actually double click and open it is better.

Trainz will want to restart after running the translation table thing.
Your user credentials will be the same and nothing will be lost.
Was an interesting idea - unfortunately it still gave me the same error. I think even placing the content folder in a simplified location, the name is too long.
 
Was an interesting idea - unfortunately it still gave me the same error. I think even placing the content folder in a simplified location, the name is too long.
Funny enough, copying the filepath from the error code into Word and checking the character count (obviously this is within the asset itself but still) gives me 132 characters. If 255 is the limit there's no way even the original directory was doubling the length of that with the editing folder and everything else. I wonder if something else is going on. I went to enable long file names in Windows but it appears it was already enabled which was odd to me...
 
Back
Top