renaming with long file name fails
Moderators: Hacker, petermad, Stefan2, white
renaming with long file name fails
If I try to rename a file to a new name with 270 characters, it first asks me if I want to keep it, but then it fails with the error "Invalid file name specified!".
I thought that TC supports long file paths (unlike Explorer). Am I missing something or is this a bug?
I thought that TC supports long file paths (unlike Explorer). Am I missing something or is this a bug?
Re: renaming with long file name fails
Well, does your filename include characters like the following?If so, remove them and it will (hopefully) work.
Regards
Dalai
Code: Select all
< > ? | " / \ : *
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
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64
Plugins: Services2, Startups, CertificateInfo, SignatureInfo, LineBreakInfo - Download-Mirror
Re: renaming with long file name fails
No, regular allowed characters only. As soon as I type too many characters it fails, the same characters work fine till then.
Re: renaming with long file name fails
a single path name component (filename or directory-name) is still limited by windows to max 255 characters.
The complete path can be longer...
c:\can't be more than 255 characters\
c:\this\can\be\more\than\255\characters\
This may also depend on the underlying file system (ntfs, ex-fat, fat32, fat16, ...)
Regards
Holger
Make our planet great again
Re: renaming with long file name fails
You're right, HolgerK. I thought the new W10 long paths setting would fix this, but it doesn't.
Perhaps TC could display a more descriptive error, although the previous warning already gives the user a clue on what's going on.
Perhaps TC could display a more descriptive error, although the previous warning already gives the user a clue on what's going on.
Re: renaming with long file name fails
JFTR: This setting you're referring to requires applications to be made aware of this change (see this MS article). Otherwise it won't change a thing. TC has been able to support long paths for several years, even without this new Win10 setting by using the long path prefix (\\?\) which also works in older Windows versions.chea wrote: 2021-06-10, 11:05 UTCI thought the new W10 long paths setting would fix this, but it doesn't.
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
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64
Plugins: Services2, Startups, CertificateInfo, SignatureInfo, LineBreakInfo - Download-Mirror
Re: renaming with long file name fails
Right.
Well, today I saw another somewhat related problem:
Does anyone know why? I mean both why it fails to open from D:\ with most programs and why it succeeds with 7-Zip.
At first I thought 7-Zip is the only one of these to be W10 long path aware, but that doesn't seem to have any effect here. I can disable that setting in GP and it doesn't change anything.
Well, today I saw another somewhat related problem:
When dragged and dropped from TC the file from D:\ drive fails to open (just like when using Explorer or FreeCommander, for instance). But it opens when dropped from the 7-Zip file manager.In short: dragging and dropping long path files from Explorer to a program's window fails, if the file is on a non-system (not C:\) drive.
Does anyone know why? I mean both why it fails to open from D:\ with most programs and why it succeeds with 7-Zip.
At first I thought 7-Zip is the only one of these to be W10 long path aware, but that doesn't seem to have any effect here. I can disable that setting in GP and it doesn't change anything.
- ghisler(Author)
- Site Admin
- Posts: 50561
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Re: renaming with long file name fails
Are you running Total Commander with higher user rights, "as administrator"? Drag&Drop does not work between programs with higher rights and programs with normal rights.When dragged and dropped from TC the file from D:\ drive fails to open
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
Re: renaming with long file name fails
No. You can read the first post in that linked thread for more details. It's a problem with long file paths, but for some reason (Windows bug?) the problem is only on non-system partitions. If the file is somewhere on the C:\ drive then it works fine.
- ghisler(Author)
- Site Admin
- Posts: 50561
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Re: renaming with long file name fails
Maybe 8.3 names are disabled for this volume. Try the command
cm_SwitchLongNames
on a button or in the command line, and check whether long names are displayed as short 8.3 names or not.
cm_SwitchLongNames
on a button or in the command line, and check whether long names are displayed as short 8.3 names or not.
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
Re: renaming with long file name fails
Yep, that's it. Interesting, I had no idea this was a thing.
Why do files dropped from the 7-Zip file manager load anyway, though? And could TC perhaps do the same, without generating 8.3 names on those volumes?
Why do files dropped from the 7-Zip file manager load anyway, though? And could TC perhaps do the same, without generating 8.3 names on those volumes?
- ghisler(Author)
- Site Admin
- Posts: 50561
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Re: renaming with long file name fails
No idea, sorry. Maybe it passes the extra-long names in a different format, e.g. with/without prefix \\?\ or uses a different clipboard format for the files.
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com