Can't open files with long names in data partitions (!= C:\)

English support forum

Moderators: white, Hacker, petermad, Stefan2

Post Reply
raika
Junior Member
Junior Member
Posts: 5
Joined: 2014-12-01, 12:24 UTC

Can't open files with long names in data partitions (!= C:\)

Post by *raika »

Windows 10 64 bits (version) 1809, new laptop bought 10 days ago.
TC 9.22a; wincmd.ini: UseLongNames=1
I have a problem that I am desperate for. I am a teacher and to classify and organize my extensive work material I use many subfolders, so I often exceed 260 characters in the absolute paths of a file.

I have the same file in the same path but in different partitions. The lenght is 294 characters.
  • D:\LES SALINES 2018-19\2n SMX - M08 - APLICACIONS WEB (6h)\UF1 - Ofimàtica i Eines Web\1. NF2 - Formularis web i altres eines (11 h)\Pràctica 2\UF1 - NF2 - PT2 - Google Tasks, Doodle, Blogger i Gmail (VERSIÓN DE LOS EJERCICIOS DEFINITIVA, PERO FALTA ESPECIFICAR LA PUNTUACIÓN DE CADA EJERCICIO).docx ==> I can't open the file with Microsoft Word. Same problem with pdf files, java files, text files...
  • C:\LES SALINES 2018-19\2n SMX - M08 - APLICACIONS WEB (6h)\UF1 - Ofimàtica i Eines Web\1. NF2 - Formularis web i altres eines (11 h)\Pràctica 2\UF1 - NF2 - PT2 - Google Tasks, Doodle, Blogger i Gmail (VERSIÓN DE LOS EJERCICIOS DEFINITIVA, PERO FALTA ESPECIFICAR LA PUNTUACIÓN DE CADA EJERCICIO).docx" ==> Microsoft Word can open the file, and the same with other kind of files.

Both partition are in the same SSD. In my laptop I have a second SSD with another two partition (E:\ and F:\) and both have the same problem than D:\ partition.

I have discover today, that I have the same error if I try to open the files in Windows Explorer, outside of TC, so TC is working well!

I have read a lot of documentation in Internet, for example: I have modified the Windows registry and the local group policy as it explained in the second link (not succesful).

Cut the path files is not a solution for me, a lot of path files are made by hand but I have others path files from Eclipse IDE projects or Visual Studio Code IDE projects.

Thank you very much for your time and dedication.
User avatar
Dalai
Power Member
Power Member
Posts: 9364
Joined: 2005-01-28, 22:17 UTC
Location: Meiningen (Südthüringen)

Re: Can't open files with long names in data partitions (!= C:\)

Post by *Dalai »

raika wrote: 2019-09-29, 16:36 UTCI have modified the Windows registry and the local group policy as it explained in the second link (not succesful).
This group policy doesn't do anything on its own. Applications have to support long paths. If an application uses a buffer that's only MAX_PATH characters long, the GPO doesn't change anything for this particular application. Furthermore, the application needs to have a setting in its manifest that tells Windows that the application is long path aware.
Cut the path files is not a solution for me
Well, it's the only solution that will work for all applications in all situations.

Summary: TC works well with long path names, but a lot of applications don't, so you need to use one of the workarounds you already found (cut the paths, subst, symlink/junction, and so on).

Regards
Dalai
#101164 Personal licence
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64

Plugins: Services2, Startups, CertificateInfo, SignatureInfo, LineBreakInfo - Download-Mirror
User avatar
MVV
Power Member
Power Member
Posts: 8702
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Re: Can't open files with long names in data partitions (!= C:\)

Post by *MVV »

Well, you have actually some ways:

1. Use newer Microsoft Office (if available).

2. Temporarily assign a temporary drive letter for folder containing required file using subst command, so its path will become shorter.

2.1. Assign drive letter for the containing folder:

Code: Select all

subst T: "D:\LES SALINES 2018-19\2n SMX - M08 - APLICACIONS WEB (6h)\UF1 - Ofimàtica i Eines Web\1. NF2 - Formularis web i altres eines (11 h)\Pràctica 2"
2.2. View or edit file via assigned drive with shortened path: "T:\UF1 - NF2 - PT2 - Google Tasks, Doodle, Blogger i Gmail (VERSIÓN DE LOS EJERCICIOS DEFINITIVA, PERO FALTA ESPECIFICAR LA PUNTUACIÓN DE CADA EJERCICIO).docx"
2.3. Remove drive letter assignment:

Code: Select all

subst T: /D
3. Create a junction or symbolic link to containing folder in a shorter location:

3.1. Create a folder link (junction should be enough and no admin rights required):

Code: Select all

mklink /J "D:\Links\Pràctica 2 (1)" "D:\LES SALINES 2018-19\2n SMX - M08 - APLICACIONS WEB (6h)\UF1 - Ofimàtica i Eines Web\1. NF2 - Formularis web i altres eines (11 h)\Pràctica 2"
3.2. View or edit file via created folder link: "D:\Links\Pràctica 2 (1)\UF1 - NF2 - PT2 - Google Tasks, Doodle, Blogger i Gmail (VERSIÓN DE LOS EJERCICIOS DEFINITIVA, PERO FALTA ESPECIFICAR LA PUNTUACIÓN DE CADA EJERCICIO).docx".
3.3. Delete folder link:

Code: Select all

rd "D:\Links\Pràctica 2 (1)"
You can easilly create TC buttonbar button that will create a drive letter or junction and then open file in it with Microsoft Word. It is easier to use folder links if you need to edit multiple files at once because you can have much more folder links than drive letters. :)
raika
Junior Member
Junior Member
Posts: 5
Joined: 2014-12-01, 12:24 UTC

Re: Can't open files with long names in data partitions (!= C:\)

Post by *raika »

Thank you very much MVV for your useful answer.
raika
Junior Member
Junior Member
Posts: 5
Joined: 2014-12-01, 12:24 UTC

Re: Can't open files with long names in data partitions (!= C:\)

Post by *raika »

Thank you very much Dalai for your useful answer.
Dalai wrote: 2019-09-29, 17:52 UTC
raika wrote: 2019-09-29, 16:36 UTCI have modified the Windows registry and the local group policy as it explained in the second link (not succesful).
This group policy doesn't do anything on its own. Applications have to support long paths. If an application uses a buffer that's only MAX_PATH characters long, the GPO doesn't change anything for this particular application. Furthermore, the application needs to have a setting in its manifest that tells Windows that the application is long path aware.
Cut the path files is not a solution for me
Well, it's the only solution that will work for all applications in all situations.

Summary: TC works well with long path names, but a lot of applications don't, so you need to use one of the workarounds you already found (cut the paths, subst, symlink/junction, and so on).

Regards
Dalai
Post Reply