Hi, I'm new to XYplorer (and loving it; wish I'd discovered it years earlier).
I can't find a particular capability that I'm looking for. I want to create a list of filenames, plus subfolders and their files, but that's all I want, i.e.:
Folder name
Filenames
Subfolder name1
Filenames
Subfolder name2
Filenames
etc.
I've tried out the "File > To Clipboard" and "Info Panel -> Report tab" features, but they all deliver too much information, e.g. file size, date, etc. I can't figure out how to pare down to just the simple list of file names. I can always post-process the listing elsewhere, but I'm trying to avoid the extra steps. Am I missing something?
Thanks!
John
Simple Filename Save to Clipboard
Re: Simple Filename Save to Clipboard
Everything without paths?
You could switch on the branch view mode, select all (ctrl+a) and then ctrl+shift+p (which is normally bound
to To Clipboard - Item Name(s))...
You could switch on the branch view mode, select all (ctrl+a) and then ctrl+shift+p (which is normally bound
to To Clipboard - Item Name(s))...
One of my scripts helped you out? Please donate via Paypal
Re: Simple Filename Save to Clipboard
Thanks for that suggestion, highend. Your method does in fact copy simple filenames (no paths, no other attributes). However, it only copies the current folder--no subfolders.
John
John
Re: Simple Filename Save to Clipboard
I think you missed this step.highend wrote: ↑ You could switch on the branch view mode,
First enable Branch View from Menu > View > Views > Branch View. or hit ctrl+shift+b. or press the branch view button on the toolbar.
Then do ctrl+a, and ctrl+shift+p.
Icon Names | Onyx | Undocumented Commands | xypcre
[ this user is asleep ]
[ this user is asleep ]
Re: Simple Filename Save to Clipboard
Sammay, I actually misinterpreted that step. I clicked the checkbox: Info->Report->Current Folder->Tree structure. Doh!
But your clarification got me on the right track. The technique captures all filenames, and filenames only. It ain't pretty. That is, the folder names are listed in sequence with the filenames without being set off in any way, but I can live with that.
Thanks for the help!
John
But your clarification got me on the right track. The technique captures all filenames, and filenames only. It ain't pretty. That is, the folder names are listed in sequence with the filenames without being set off in any way, but I can live with that.
Thanks for the help!
John
Re: Simple Filename Save to Clipboard
If it is of any interest to you below is another way to do it via a script instead of the gui, doing it this way you could customize it to indent the files or add a divider to the folders etc.
If you wanted to try it just goto the root path you want the list created for, and then run it from the XY addressbar (no need to be in branch view mode)
to learn the possibilities of the report scripting command look it up in the help file under the Advanced Topics\Scripting Commands section.
If you wanted to try it just goto the root path you want the list created for, and then run it from the XY addressbar (no need to be in branch view mode)
Code: Select all
text report("{dir {Name}| {Name}}<crlf>", quicksearch(,,"|"));
Re: Simple Filename Save to Clipboard
Very nice, jupe! Even better than the gui approach. I added it to a script item in the Catalog, with these mods:
text report("{dir ==== {Fullname} ====|{Name}}<crlf>", quicksearch(,,"|"));
This sets off the folder with the equal signs before and after a full path/name. Is there a better way of repeating the equal signs?
text report("{dir ==== {Fullname} ====|{Name}}<crlf>", quicksearch(,,"|"));
This sets off the folder with the equal signs before and after a full path/name. Is there a better way of repeating the equal signs?
Re: Simple Filename Save to Clipboard
Regarding the equal signs, the way you have done it looks ok, but you could also post process the output to count each line to find the longest line, then add as many equal signs to each line as needed to keep each line to a certain length (justified) if that is what you were asking?, the possibilities are pretty endless with scripting, you could even generate html tables etc, all script commands are pretty extensively documented in the help file.
PS: FYI, if you want the output to go straight to clipboard without the text popup, just replace the "text" prefix with "copytext".
PS: FYI, if you want the output to go straight to clipboard without the text popup, just replace the "text" prefix with "copytext".
Re: Simple Filename Save to Clipboard
Thanks for the tip on copytext.
I don't need anything as pretty as even-length lines. I think I'll work out an if-then-else that sets off folder names with, say, lines before and after, but just lists filenames in a plain list.
I don't need anything as pretty as even-length lines. I think I'll work out an if-then-else that sets off folder names with, say, lines before and after, but just lists filenames in a plain list.
Re: Simple Filename Save to Clipboard
I wasn't sure what you were asking, so in that case then this is probably close to what you are after:
Code: Select all
$div = strrepeat("=", 60); text report("{dir $div<crlf> {Fullname} <crlf>$div|{Name}}<crlf>", "<curpath>|" . quicksearch(,,"|"));
Re: Simple Filename Save to Clipboard
jupe, that's perfect! Exactly what I was looking for. Thanks very much.--John