Menu

#157 Results Context Copy Function: Handling of spaces in file names/paths

open
None
1
2020-09-18
2020-09-17
No

Hello,
as known, you can copy the file's paths by context menu in file result list.
If you select multiple files and do the context menu's copy, a path list of all files is copied to clipboard.
But if there is a space characters inside the file's name or path, the list can NOT handled by a windows file selector box, if it's pasted into it (siehe attached picture).
To do it right, it's necessary to encapsulate each entry with quotation marks.
Example current clipboard content:
D:\file 1.txt
D:\file 2.txt
Example correct clipboard content:
"D:\file 1.txt"
"D:\file 2.txt"
So the handling rule should be:
If multiple files are selected AND a file name/path contains spaces THEN the regarding path has to be encapsulated with quotation marks.
I'm not familiar with other OS than Windows, so I can't say it should be done in general or only in Windows...
Best Regards,
Heiko

1 Attachments

Discussion

  • Nam-Quang Tran

    Nam-Quang Tran - 2020-09-18

    The copy function is not meant to be used with the Windows file selector. It's meant to be used in the following ways:

    1. Copy files and paste them into a folder.
    2. Copy files and paste their paths into a text editor or word processor for further processing.

    In the second case, no quotation marks are added because this would make processing the paths by some script or program more complicated.

    Also, the quotation marks seem to be a Windows-specific thing. I've never seen them on Linux or macOS.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.