Copy Names: double-quotes around pathnames with spaces?

Discussion & Support for xplorer² professional

Moderators: fgagnon, nikos, Site Mods

EMathews3
Bronze Member
Bronze Member
Posts: 100
Joined: 2014 Aug 23, 12:54

Copy Names: double-quotes around pathnames with spaces?

Post by EMathews3 »

For Edit / Copy Names (Alt-C), what option will add enclosing double-quotes around pathnames that contain spaces?
Yes some paste targets can accept pathnames with spaces without double quotes, but some places *do* need the double quotes.
User avatar
nikos
Site Admin
Site Admin
Posts: 16402
Joined: 2002 Feb 07, 15:57
Location: UK

Re: Copy Names: double-quotes around pathnames with spaces?

Post by nikos »

use alt+shift+C instead which gets 8.3 names that don't have spaces
EMathews3
Bronze Member
Bronze Member
Posts: 100
Joined: 2014 Aug 23, 12:54

Re: Copy Names: double-quotes around pathnames with spaces?

Post by EMathews3 »

Yes thanks I am aware of that option, but was hoping for something more human-readable. Default setup for Copy Names:

Code: Select all

Alt          -C = Copy     Names, one per         line: C:\Data\Misc
                                                        C:\Data\Mozilla Profiles
Alt     +Shft-C = Copy 8.3 Names, one per         line: C:\Data\Misc
                                                        C:\Data\MOZILL~1
Alt+Ctrl     -C = Copy     Names, comma-separated list: C:\Data\Misc,C:\Data\Mozilla Profiles
Alt+Ctrl+Shft-C = Copy 8.3 Names, comma-separated list: C:\Data\Misc,C:\Data\MOZILL~1
This is genius, really - I appreciate the completeness.

Also I understand 8.3 names are unavailable by default for non-system volumes on Windows 10? This can be controlled with "FSUtil 8dot3name" on Win 8 too. Looks like they are on the road to being deprecated, and will become less-existent as a backstop for Alt-C.

What about when 8.3 names are turned off - how does Copy Names behave? Would double-quotes be more needed when the 8.3 names don't even exist? Testing Copy Names with Shift pressed down shows:

Code: Select all

  directory entries having    8.3 names: 8dt3 names are returned (these never have spaces)
  directory entries having no 8.3 names: long names are returned (these often have spaces)
So if we are automatically processing a set of pathnames from Copy Names, and expecting the 8dt3 names so as to avoid spaces, then the process will often break, because Copy Names will pass unquoted long names when the 8dt3 names do not exist. XP2 thereby requires downstream processes to parse pathnames as separated by newlines or commas. Parsing a comma-separated list will fail when unquoted pathnames contains commas.

I suggest that sooner or later, Copy Names should be able to provide double-quotes to enclose long pathnames, especially for pathnames that have no 8dt3 shortnames, more-especially when producing a comma-separated list. This feature will link forward compatibility with backward, and better support the Windows filesystem. What use is an unquoted comma-separated list when pathnames contain commas?
User avatar
FrizzleFry
Platinum Member
Platinum Member
Posts: 1258
Joined: 2005 Oct 16, 19:09

Re: Copy Names: double-quotes around pathnames with spaces?

Post by FrizzleFry »

It would be nice if x2 automatically added quotes for the tokens used in user commands like $F, $N as well.
User avatar
nikos
Site Admin
Site Admin
Posts: 16402
Joined: 2002 Feb 07, 15:57
Location: UK

Re: Copy Names: double-quotes around pathnames with spaces?

Post by nikos »

that's why there are lowercase versions of all tokens $f etc that are 8.3 and don't need quotes
now for the matter where 8.3 names do not exist, I will take care of it for the next version