Page 1 of 2 12 LastLast
Results 1 to 10 of 20

Thread: Copy current path from file dialog

  1. #1
    Join Date
    Jun 2010
    Beans
    94

    Copy current path from file dialog

    In gedit, when opening a file, the path of the currently opened file is displayed in that dialog with some buttons, one for each level. But I want to copy the path as text so that I can save a new file in the same path, which is not preselected otherwise. I don't want to remember and type in the path every time, that's what the clipboard is for. But gedit won't let me copy that path. Any idea?

  2. #2
    Join Date
    Nov 2011
    Location
    /dev/root
    Beans
    6,000

    Re: Copy current path from file dialog

    Yes, when you select Save as the same directory will be preselected and shown. Or maybe I don't understand your problem?

    Edit: And when you select Save (ctrl s) it defaults to writing to the same directory/filename.

  3. #3
    Join Date
    Jun 2010
    Beans
    94

    Re: Copy current path from file dialog

    I have opened one file in /some/very/long/and/hard/to/reembemr/path. Then I create a new file with Ctrl+N. Last time I tried to save this file, my home folder or something equally useless was preselected. So I went back to the other file and went to the Open File dialog, where the file's current path is already selected - but no way to copy it into the clipboard.

    Oh, and when I want to enter a path alone, to browse the files there and then select a new file name, I entered the path, hit the Enter key and boom - the dialog was closed and an error message told me that this was a directory. Yes I Know.

    (I'm a Windows user. Please tell me what I need to do differently to get the same stuff done on Ubuntu/Gnome.)
    Last edited by LonelyPixel; January 4th, 2013 at 08:39 PM.

  4. #4
    Join Date
    Nov 2011
    Location
    /dev/root
    Beans
    6,000

    Re: Copy current path from file dialog

    Quote Originally Posted by LonelyPixel View Post
    I have opened one file in /some/very/long/and/hard/to/reembemr/path. Then I create a new file with Ctrl+N. Last time I tried to save this file, my home folder or something equally useless was preselected. So I went back to the other file and went to the Open File dialog, where the file's current path is already selected - but no way to copy it into the clipboard.

    Oh, and when I want to enter a path alone, to browse the files there and then select a new file name, I entered the path, hit the Enter key and boom - the dialog was closed and an error message told me that this was a directory. Yes I Know.

    (I'm a Windows user. Please tell me what I need to do differently to get the same stuff done on Ubuntu/Gnome.)
    OK, you open a new file, not trying to save the old file. Well, I'm happy with the terminal window and command lines, so I open such a terminal window and change directory to /some/very/long/and/hard/to/reembemr/path. That can be done with drag and drop from the file browser Nautilus (the standard one of Ubuntu). And you are right in place.

    type
    Code:
    cd {space}
    {and drop the long path}
    Code:
    cd  /some/very/long/and/hard/to/reembemr/path
    Then run gedit from the command line:

    Code:
    gedit filename
    or if you want to detach it from the terminal window:
    Code:
    gedit filename &

  5. #5
    Join Date
    Jun 2010
    Beans
    94

    Re: Copy current path from file dialog

    Okay, that's how I have initially opened the first file. But then I needed to create another, new file, in the same directory, or one level up or so. So I thought, well, now that I'm here, why not use what gedit can do. Once I am in gedit, am I then lost?

  6. #6
    Join Date
    Nov 2011
    Location
    /dev/root
    Beans
    6,000

    Re: Copy current path from file dialog

    When you open a new file, do it from the same terminal window (if you used & at the end of the command line), and it will go into the same gedit window, but with another tab

  7. #7
    Join Date
    Apr 2009
    Beans
    559

    Re: Copy current path from file dialog

    You can also right click on the path name and "select all" and copy it, then when "saving as" paste the previous address and only have to edit the end of it.


  8. #8
    Join Date
    Jun 2010
    Beans
    94

    Re: Copy current path from file dialog

    Alright, so you say that Gnome or gedit are not able to give me the current path in plain text, but only in that playful not not especially beautiful buttons. Right?

  9. #9
    Join Date
    Jun 2010
    Beans
    94

    Re: Copy current path from file dialog

    Quote Originally Posted by houseworkshy View Post
    You can also right click on the path name and "select all" then when "saving as" paste the previous address and only have to edit the end of it.
    Oh, multiple users. So for this: There is no text to select or copy. It's just buttons. If there was text, I wouldn't ask such a question. Have you actually seen it?

  10. #10
    Join Date
    Apr 2009
    Beans
    559

    Re: Copy current path from file dialog

    My appologies you are right, sorry about that,not sure what I was thinking of. I have used an editor which does have the option to put the location at the top web browser style. Now I'm digging around trying to find out which one it was. Sorry about that.
    One thing though, if you select properties you can select and copy from the text in the popup itself, not just the text entry box.
    There are also clip board managers like Parcellite which allow one to have and use a clipboard history. One of those may help, I use the default Klipper in KDE.


Page 1 of 2 12 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •