Right click option to copy file name (or directory name)
Clash Royale CLAN TAG#URR8PPP
up vote
1
down vote
favorite
I'm trying to find a way to have the right click option to copy file name (or directory name).
I'm use nautilus scripts but I'm having a hard time figuring this out.
Can anybody help?
nautilus menu
add a comment |Â
up vote
1
down vote
favorite
I'm trying to find a way to have the right click option to copy file name (or directory name).
I'm use nautilus scripts but I'm having a hard time figuring this out.
Can anybody help?
nautilus menu
Thank you. The script works, but it ads two new lines at the end. Is there a way to remove them?
â user68563
Aug 9 '16 at 15:53
Well, now there's only one new line at the end. I'm on debian XFCE and installed Nautilus (3.4.2) as an extra file manager.
â user68563
Aug 10 '16 at 23:40
#!/bin/sh
thenfilepath=$NAUTILUS_SCRIPT_SELECTED_FILE_PATHS
thenname=$filepath##*/
thenname=$name%
thenthen
printf %s "$name" | xclip -selection clipboard
(so the second closing brace is on a separate line)
â don_crissti
Aug 11 '16 at 10:00
Thanks for your effort, but it still ads a line break at the end
â user68563
Aug 14 '16 at 11:05
Well, that definitely has to do with your setup because I used the last version for an entire day and it worked as expected on my system (no trailing newlines). Anyway, the proper way to do this would be withpython
(or, even better,C
- but I don't knowC
) - however I don't have the time to look into this right now...
â don_crissti
Aug 14 '16 at 11:09
add a comment |Â
up vote
1
down vote
favorite
up vote
1
down vote
favorite
I'm trying to find a way to have the right click option to copy file name (or directory name).
I'm use nautilus scripts but I'm having a hard time figuring this out.
Can anybody help?
nautilus menu
I'm trying to find a way to have the right click option to copy file name (or directory name).
I'm use nautilus scripts but I'm having a hard time figuring this out.
Can anybody help?
nautilus menu
nautilus menu
asked Aug 8 '16 at 20:28
user68563
6010
6010
Thank you. The script works, but it ads two new lines at the end. Is there a way to remove them?
â user68563
Aug 9 '16 at 15:53
Well, now there's only one new line at the end. I'm on debian XFCE and installed Nautilus (3.4.2) as an extra file manager.
â user68563
Aug 10 '16 at 23:40
#!/bin/sh
thenfilepath=$NAUTILUS_SCRIPT_SELECTED_FILE_PATHS
thenname=$filepath##*/
thenname=$name%
thenthen
printf %s "$name" | xclip -selection clipboard
(so the second closing brace is on a separate line)
â don_crissti
Aug 11 '16 at 10:00
Thanks for your effort, but it still ads a line break at the end
â user68563
Aug 14 '16 at 11:05
Well, that definitely has to do with your setup because I used the last version for an entire day and it worked as expected on my system (no trailing newlines). Anyway, the proper way to do this would be withpython
(or, even better,C
- but I don't knowC
) - however I don't have the time to look into this right now...
â don_crissti
Aug 14 '16 at 11:09
add a comment |Â
Thank you. The script works, but it ads two new lines at the end. Is there a way to remove them?
â user68563
Aug 9 '16 at 15:53
Well, now there's only one new line at the end. I'm on debian XFCE and installed Nautilus (3.4.2) as an extra file manager.
â user68563
Aug 10 '16 at 23:40
#!/bin/sh
thenfilepath=$NAUTILUS_SCRIPT_SELECTED_FILE_PATHS
thenname=$filepath##*/
thenname=$name%
thenthen
printf %s "$name" | xclip -selection clipboard
(so the second closing brace is on a separate line)
â don_crissti
Aug 11 '16 at 10:00
Thanks for your effort, but it still ads a line break at the end
â user68563
Aug 14 '16 at 11:05
Well, that definitely has to do with your setup because I used the last version for an entire day and it worked as expected on my system (no trailing newlines). Anyway, the proper way to do this would be withpython
(or, even better,C
- but I don't knowC
) - however I don't have the time to look into this right now...
â don_crissti
Aug 14 '16 at 11:09
Thank you. The script works, but it ads two new lines at the end. Is there a way to remove them?
â user68563
Aug 9 '16 at 15:53
Thank you. The script works, but it ads two new lines at the end. Is there a way to remove them?
â user68563
Aug 9 '16 at 15:53
Well, now there's only one new line at the end. I'm on debian XFCE and installed Nautilus (3.4.2) as an extra file manager.
â user68563
Aug 10 '16 at 23:40
Well, now there's only one new line at the end. I'm on debian XFCE and installed Nautilus (3.4.2) as an extra file manager.
â user68563
Aug 10 '16 at 23:40
#!/bin/sh
then filepath=$NAUTILUS_SCRIPT_SELECTED_FILE_PATHS
then name=$filepath##*/
then name=$name%
then
then printf %s "$name" | xclip -selection clipboard
(so the second closing brace is on a separate line)â don_crissti
Aug 11 '16 at 10:00
#!/bin/sh
then filepath=$NAUTILUS_SCRIPT_SELECTED_FILE_PATHS
then name=$filepath##*/
then name=$name%
then
then printf %s "$name" | xclip -selection clipboard
(so the second closing brace is on a separate line)â don_crissti
Aug 11 '16 at 10:00
Thanks for your effort, but it still ads a line break at the end
â user68563
Aug 14 '16 at 11:05
Thanks for your effort, but it still ads a line break at the end
â user68563
Aug 14 '16 at 11:05
Well, that definitely has to do with your setup because I used the last version for an entire day and it worked as expected on my system (no trailing newlines). Anyway, the proper way to do this would be with
python
(or, even better, C
- but I don't know C
) - however I don't have the time to look into this right now...â don_crissti
Aug 14 '16 at 11:09
Well, that definitely has to do with your setup because I used the last version for an entire day and it worked as expected on my system (no trailing newlines). Anyway, the proper way to do this would be with
python
(or, even better, C
- but I don't know C
) - however I don't have the time to look into this right now...â don_crissti
Aug 14 '16 at 11:09
add a comment |Â
1 Answer
1
active
oldest
votes
up vote
0
down vote
Open a terminal window.
cd "Directory" (without the quotes) -- hit the enter key.
ls (then hit "Enter" Key)
After the list is returned in the window, highlight and copy the list of returned files, then copy them to a doc or spreadsheet.
Example 1:
cd Documents (followed by Enter key)
ls (followed by Enter key)
Copy the generated list of files in the Documents directory/folder and paste into spreadsheet, or simply save them into a text file.
New contributor
add a comment |Â
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
0
down vote
Open a terminal window.
cd "Directory" (without the quotes) -- hit the enter key.
ls (then hit "Enter" Key)
After the list is returned in the window, highlight and copy the list of returned files, then copy them to a doc or spreadsheet.
Example 1:
cd Documents (followed by Enter key)
ls (followed by Enter key)
Copy the generated list of files in the Documents directory/folder and paste into spreadsheet, or simply save them into a text file.
New contributor
add a comment |Â
up vote
0
down vote
Open a terminal window.
cd "Directory" (without the quotes) -- hit the enter key.
ls (then hit "Enter" Key)
After the list is returned in the window, highlight and copy the list of returned files, then copy them to a doc or spreadsheet.
Example 1:
cd Documents (followed by Enter key)
ls (followed by Enter key)
Copy the generated list of files in the Documents directory/folder and paste into spreadsheet, or simply save them into a text file.
New contributor
add a comment |Â
up vote
0
down vote
up vote
0
down vote
Open a terminal window.
cd "Directory" (without the quotes) -- hit the enter key.
ls (then hit "Enter" Key)
After the list is returned in the window, highlight and copy the list of returned files, then copy them to a doc or spreadsheet.
Example 1:
cd Documents (followed by Enter key)
ls (followed by Enter key)
Copy the generated list of files in the Documents directory/folder and paste into spreadsheet, or simply save them into a text file.
New contributor
Open a terminal window.
cd "Directory" (without the quotes) -- hit the enter key.
ls (then hit "Enter" Key)
After the list is returned in the window, highlight and copy the list of returned files, then copy them to a doc or spreadsheet.
Example 1:
cd Documents (followed by Enter key)
ls (followed by Enter key)
Copy the generated list of files in the Documents directory/folder and paste into spreadsheet, or simply save them into a text file.
New contributor
edited 3 mins ago
New contributor
answered 8 mins ago
larrybradley
1
1
New contributor
New contributor
add a comment |Â
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f302121%2fright-click-option-to-copy-file-name-or-directory-name%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Thank you. The script works, but it ads two new lines at the end. Is there a way to remove them?
â user68563
Aug 9 '16 at 15:53
Well, now there's only one new line at the end. I'm on debian XFCE and installed Nautilus (3.4.2) as an extra file manager.
â user68563
Aug 10 '16 at 23:40
#!/bin/sh
thenfilepath=$NAUTILUS_SCRIPT_SELECTED_FILE_PATHS
thenname=$filepath##*/
thenname=$name%
thenthen
printf %s "$name" | xclip -selection clipboard
(so the second closing brace is on a separate line)â don_crissti
Aug 11 '16 at 10:00
Thanks for your effort, but it still ads a line break at the end
â user68563
Aug 14 '16 at 11:05
Well, that definitely has to do with your setup because I used the last version for an entire day and it worked as expected on my system (no trailing newlines). Anyway, the proper way to do this would be with
python
(or, even better,C
- but I don't knowC
) - however I don't have the time to look into this right now...â don_crissti
Aug 14 '16 at 11:09