Right click option to copy file name (or directory name)

The name of the pictureThe name of the pictureThe name of the pictureClash 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?










share|improve this question





















  • 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 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










  • 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















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?










share|improve this question





















  • 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 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










  • 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













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?










share|improve this question













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






share|improve this question













share|improve this question











share|improve this question




share|improve this question










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










  • 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

















  • 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 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










  • 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
















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











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.





share










New contributor




larrybradley is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.

















    Your Answer







    StackExchange.ready(function()
    var channelOptions =
    tags: "".split(" "),
    id: "106"
    ;
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function()
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled)
    StackExchange.using("snippets", function()
    createEditor();
    );

    else
    createEditor();

    );

    function createEditor()
    StackExchange.prepareEditor(
    heartbeatType: 'answer',
    convertImagesToLinks: false,
    noModals: false,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: null,
    bindNavPrevention: true,
    postfix: "",
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    );



    );













     

    draft saved


    draft discarded


















    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






























    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.





    share










    New contributor




    larrybradley is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
    Check out our Code of Conduct.





















      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.





      share










      New contributor




      larrybradley is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.



















        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.





        share










        New contributor




        larrybradley is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
        Check out our Code of Conduct.









        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.






        share










        New contributor




        larrybradley is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
        Check out our Code of Conduct.








        share


        share








        edited 3 mins ago





















        New contributor




        larrybradley is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
        Check out our Code of Conduct.









        answered 8 mins ago









        larrybradley

        1




        1




        New contributor




        larrybradley is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
        Check out our Code of Conduct.





        New contributor





        larrybradley is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
        Check out our Code of Conduct.






        larrybradley is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
        Check out our Code of Conduct.



























             

            draft saved


            draft discarded















































             


            draft saved


            draft discarded














            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













































































            Popular posts from this blog

            How to check contact read email or not when send email to Individual?

            Bahrain

            Postfix configuration issue with fips on centos 7; mailgun relay