Page 1 of 1
How to copy list of file names to clipboard?
Posted: Thu Jan 09, 2025 5:00 am
by LANdpLAN
In linux mint and lite and Ubuntu I can select all the files in a folder. Edit>copy and then into a libreoffice calc sheet edit>paste and I get all of the file paths. One in each row.
How can I do this in Puppy Linux?
Re: copying list of file names
Posted: Thu Jan 09, 2025 5:53 am
by Geek3579
If you only want a simple list of files (output to text file), use the following in a terminal open in the desired directory: ls > file.txt
You can also output to a csv file which can be opened in Libreoffice etc.
Re: copying list of file names
Posted: Thu Jan 09, 2025 3:09 pm
by Trapster
If you want a list of filenames with the full path, open a terminal in the directory you want and use:
You could also do:
Code: Select all
find /some/directory > /root/list.txt
Re: copying list of file names
Posted: Thu Jan 09, 2025 3:16 pm
by wizard
@LANdpLAN
You can use XFE file manager to do it.
wizard
Re: copying list of file names
Posted: Thu Jan 09, 2025 10:21 pm
by don570
If you are doing a file search using pfind
you can save results from the File menu.
________________________________________
Re: copying list of file names
Posted: Fri Jan 10, 2025 6:01 am
by MochiMoppel
LANdpLAN wrote: Thu Jan 09, 2025 5:00 amHow can I do this in Puppy Linux?
It depends on what Puppy distro you are using (there are many different ones!), and within your distro which application you are using to select files.
After reading your previous posts I assume that you use BookwormPup64 and try to select files in a ROX window.
BW64 ships with Xfe as an alternative file manager, where it takes only Ctrl+C to copy the full filepaths of the selected files into the clipboard, each on a separate line.
No such thing in ROX. However it can be done via a shell script and there are several ways to invoke such a script:
- ROX's Shift+Rightclick menu. Script would be the most easy one of all, but the menu is poorly maintained and picking the option from the crowded menu is a bit cumbersome.
- A keyboard shortcut, e.g. Ctrl+Shift+C. Would work as Xfe's Ctrl+C and IMHO would be the most elegant solution. Script would be a bit more complex.
- A desktop icon, onto which you would have to drag the selected files.
Whatever your choice, your script would need a clipboard tool like xclip (installed in BW64) or xsel to send the selected filepaths to the clipboard.
BTW: I'm surprised that no one has requested this feature so far. It's common in every decent file manager, but ROX-Filer is a different animal.
@Flash You changed the original thread title to "How to copy list of file names to Libreoffice?"
I suggest that instead of "Libreoffice" you use "clipboard" because it's a general problem and the final target application is irrelevant here. Applies also to pasting from clipboard into Gnumeric, Abiword or whatever.
Re: How to copy list of file names to clipboard?
Posted: Fri Jan 10, 2025 7:02 pm
by vektor_alian
Leafpad also prints the paths of multiple files dropped into it, one per line.
Vektor
Re: How to copy list of file names to clipboard?
Posted: Sat Jan 11, 2025 12:11 am
by wizard
@MochiMoppel
Applies also to pasting from clipboard into Gnumeric, Abiword or whatever.
Not 100% true since file list copied from XFE file manager will paste with full paths into Libreoffice Calc, but not into Gnumeric.
wizard
Re: How to copy list of file names to clipboard?
Posted: Sat Jan 11, 2025 7:46 am
by MochiMoppel
wizard wrote: Sat Jan 11, 2025 12:11 amfile list copied from XFE file manager will paste with full paths into Libreoffice Calc, but not into Gnumeric.
I'm not sure if this is a Xfe or a Gnumeric issue, probably the latter. Gnumeric correctly receives CLIPBOARD or PRIMARY buffer content and can paste it into the address box, but not into cells when the source is Xfe. File lists copied from Leafpad or Geany work without problems. However it works when
1) Ctrl+C in Xfe
2) Paste with Ctrl+V in Leafpad
3) Paste again with Ctrl+V, but this time into Gnumeric
There is a dedicated option in Gnumeric to control Copy&Paste behavior (Menu Edit > Preferences > Tools > Copy and Paste), but this also doesn't work as expected.
Re: How to copy list of file names to clipboard?
Posted: Sat Jan 11, 2025 10:05 am
by LANdpLAN
vektor_alian wrote: Fri Jan 10, 2025 7:02 pm
Leafpad also prints the paths of multiple files dropped into it, one per line.
Vektor
I tried L3afpad and unfortunately it put them all on the same line
Re: How to copy list of file names to clipboard?
Posted: Sat Jan 11, 2025 10:23 am
by vektor_alian
Hey LANdpLAN
I have ver. 0.8.18.1
If you cannot get it let me know and I will put it on my GDrive share.
I run PorteuX but it also works on my Puppy Slacko-15
Vektor
Re: How to copy list of file names to clipboard?
Posted: Sat Jan 11, 2025 10:54 am
by MochiMoppel
vektor_alian wrote: Fri Jan 10, 2025 7:02 pm
Leafpad also prints the paths of multiple files dropped into it, one per line.
Not when the source is ROX-Filer.
Re: How to copy list of file names to clipboard?
Posted: Sat Jan 11, 2025 2:12 pm
by wizard
@MochiMoppel
I'm not sure if this is a Xfe or a Gnumeric issue, probably the latter
Your test are the same as mine, and it does seem to be an issue with Gnumeric. Shouldn't be a problem since pasting from XFE does work work correctly with other programs like Geany and Libre Calc, that @LANdpLAN originally inquired about.
@LANdpLAN
If you are interested in adding features/capabilities to XFE, take a look here:
viewtopic.php?p=79989&hilit=xfe#p79989
Thanks
wizard