trivia quiz

Discussion & Support for xplorer² professional

Moderators: fgagnon, nikos, Site Mods

Post Reply
User avatar
nikos
Site Admin
Site Admin
Posts: 15771
Joined: 2002 Feb 07, 15:57
Location: UK
Contact:

trivia quiz

Post by nikos »

say you have 100 filenames in a text file
how do you select them in a large folder that contains them?
note: hiring somebody from mechanical turk to do the job is not a valid answer
Kilmatead
Platinum Member
Platinum Member
Posts: 4573
Joined: 2008 Sep 30, 06:52
Location: Dublin

Re: trivia quiz

Post by Kilmatead »

Someone like nikos might have already added that feature in version 3.0.0.0 a year ago...
v3 Changelog wrote:* [P] plain text files can also be used to load/save scrap window contents (not just the binary CIDA format). Use the file type selector "Path text files" in the Load/Write contents menu commands. There should be one full path per line, as when importing text from the clipboard. You can also pass a TXT file as a command line parameter with /F:1 switch.
On the other hand, if this is somehow a trick question :shock: and you literally want a list of filenames highlighted in a given x2 listview, anyone else would just write a script. :shrug: You want me to write you a script? What's wrong with the world? You don't like Mondays? You feeling alright? Did you forget to take your pills this morning?
User avatar
nikos
Site Admin
Site Admin
Posts: 15771
Joined: 2002 Feb 07, 15:57
Location: UK
Contact:

Re: trivia quiz

Post by nikos »

right, i forgot about that :shock:
yesterday I had to do just that and select some files I got out of windiff into the windows folder, and I had to define a filter with a comma separated list of names... which is also a valid answer but I wish i'd remembered that other scrap window trick!
Kilmatead
Platinum Member
Platinum Member
Posts: 4573
Joined: 2008 Sep 30, 06:52
Location: Dublin

Re: trivia quiz

Post by Kilmatead »

Image
Robert2
Gold Member
Gold Member
Posts: 671
Joined: 2004 Jun 17, 15:39

Re: trivia quiz

Post by Robert2 »

As I understand this, the Send to Scrap or Load into Scrap will only work if the text file contains full file path names. It seems it won’t work with simple file names. Is this correct?
Kilmatead
Platinum Member
Platinum Member
Posts: 4573
Joined: 2008 Sep 30, 06:52
Location: Dublin

Re: trivia quiz

Post by Kilmatead »

It can't work with "pathless" names because scrap containers don't have a "location" associated with them like a normal browsing pane. Each item is location-independent, which is what makes them so useful.

This is the "Load Contents..." entry in the scrap's context menu. The "send to scrap" is for sending current selection(s) into a scrap container from within x2 itself (drag-&-drop also works), no text involved.

Handling pathless-objects would have to be a scripting job, where it either assumes the current working directory (not a trustworthy source), or the text file itself would have to define a path (say, on the first element). You could also take the comma-separated-list approach which nikos used, but that's fiddly at best. I rarely run across programmes which export filenames without paths unless it's a specific CSV type of thing, which again, would require some form of scripting to assemble only the parts you might want, rejecting those you don't, bespoke. :shrug:
Robert2
Gold Member
Gold Member
Posts: 671
Joined: 2004 Jun 17, 15:39

Re: trivia quiz

Post by Robert2 »

This was a rather rhetorical question. A scripting job would be gross overkill. I would simply create/use 2 text files with “pathless names” and compare them in WinMerge.
User avatar
nikos
Site Admin
Site Admin
Posts: 15771
Joined: 2002 Feb 07, 15:57
Location: UK
Contact:

Re: trivia quiz

Post by nikos »

I was working with plain names yesterday, that's why I didn't remember about scrap import :P
It occured to me to add a new command to "import names in selection clipboard" (MARK > SELECTION menu) but you just need to import into a scrap and copy the selection out of there
Kilmatead
Platinum Member
Platinum Member
Posts: 4573
Joined: 2008 Sep 30, 06:52
Location: Dublin

Re: trivia quiz

Post by Kilmatead »

Robert2 wrote:This was a rather rhetorical question.
You know me... I don't get out of bed for anything less than "gross overkill". :D

(I assumed you were referring to Nikos' original request, to have a file containing textual names [with or without paths] interpreted and the matching contents highlighted in the currently active listview pane so you could actually do something with the objects themselves, which would be much more complex/entertaining. For comparing names... well... that's best done ex parte as you surmised. You can't beat a dedicated compare-utility.)
nikos wrote:that's why I didn't remember about scrap import
Don't try and mitigate your public humiliation with some "oh, it was a special case" instance... that's cheating. :wink:
Robert2
Gold Member
Gold Member
Posts: 671
Joined: 2004 Jun 17, 15:39

Re: trivia quiz

Post by Robert2 »

Nikos, I am not sure I understand what you mean. I personally would simply select a number of files in list view mode, press Ctrl+P in x2, then Ctrl+V into Notepad++. Or am I missing something?
User avatar
nikos
Site Admin
Site Admin
Posts: 15771
Joined: 2002 Feb 07, 15:57
Location: UK
Contact:

Re: trivia quiz

Post by nikos »

the list of files I had was not coming from xplorer2 and didn't have full paths
Post Reply