How to copy list of file names to clipboard?

New to Puppy and have questions? Start here

Moderator: Forum moderators

Post Reply
LANdpLAN
Posts: 77
Joined: Tue May 14, 2024 4:26 pm
Has thanked: 12 times
Been thanked: 6 times

How to copy list of file names to clipboard?

Post 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?

Last edited by Flash on Fri Jan 10, 2025 4:30 pm, edited 2 times in total.
Reason: Made the original subject line into a question
Geek3579
Posts: 286
Joined: Sat Jul 18, 2020 1:07 pm
Has thanked: 82 times
Been thanked: 74 times

Re: copying list of file names

Post 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.

User avatar
Trapster
Posts: 201
Joined: Sat Aug 01, 2020 7:44 pm
Location: Texas
Has thanked: 1 time
Been thanked: 61 times

Re: copying list of file names

Post by Trapster »

If you want a list of filenames with the full path, open a terminal in the directory you want and use:

Code: Select all

find "$PWD" > /root/list.txt

You could also do:

Code: Select all

find /some/directory > /root/list.txt
User avatar
wizard
Posts: 2084
Joined: Sun Aug 09, 2020 7:50 pm
Location: Oklahoma, USA
Has thanked: 2833 times
Been thanked: 753 times

Re: copying list of file names

Post by wizard »

@LANdpLAN

You can use XFE file manager to do it.

wizard

Big pile of OLD computers

User avatar
don570
Posts: 729
Joined: Sat Nov 21, 2020 4:43 pm
Has thanked: 5 times
Been thanked: 130 times

Re: copying list of file names

Post by don570 »

If you are doing a file search using pfind
you can save results from the File menu.

________________________________________

User avatar
MochiMoppel
Posts: 1294
Joined: Mon Jun 15, 2020 6:25 am
Location: Japan
Has thanked: 22 times
Been thanked: 480 times

Re: copying list of file names

Post by MochiMoppel »

LANdpLAN wrote: Thu Jan 09, 2025 5:00 am

How 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.

vektor_alian
Posts: 74
Joined: Thu Apr 01, 2021 12:36 am
Been thanked: 21 times

Re: How to copy list of file names to clipboard?

Post by vektor_alian »

Leafpad also prints the paths of multiple files dropped into it, one per line.

Vektor

User avatar
wizard
Posts: 2084
Joined: Sun Aug 09, 2020 7:50 pm
Location: Oklahoma, USA
Has thanked: 2833 times
Been thanked: 753 times

Re: How to copy list of file names to clipboard?

Post 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

Big pile of OLD computers

User avatar
MochiMoppel
Posts: 1294
Joined: Mon Jun 15, 2020 6:25 am
Location: Japan
Has thanked: 22 times
Been thanked: 480 times

Re: How to copy list of file names to clipboard?

Post by MochiMoppel »

wizard wrote: Sat Jan 11, 2025 12:11 am

file 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.

LANdpLAN
Posts: 77
Joined: Tue May 14, 2024 4:26 pm
Has thanked: 12 times
Been thanked: 6 times

Re: How to copy list of file names to clipboard?

Post 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

vektor_alian
Posts: 74
Joined: Thu Apr 01, 2021 12:36 am
Been thanked: 21 times

Re: How to copy list of file names to clipboard?

Post 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

User avatar
MochiMoppel
Posts: 1294
Joined: Mon Jun 15, 2020 6:25 am
Location: Japan
Has thanked: 22 times
Been thanked: 480 times

Re: How to copy list of file names to clipboard?

Post 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.

User avatar
wizard
Posts: 2084
Joined: Sun Aug 09, 2020 7:50 pm
Location: Oklahoma, USA
Has thanked: 2833 times
Been thanked: 753 times

Re: How to copy list of file names to clipboard?

Post 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

Big pile of OLD computers

Post Reply

Return to “Beginners Help”