Results 1 to 10 of 20

Thread: Copy current path from file dialog

Hybrid View

  1. #1
    Join Date
    Jun 2010
    Beans
    102

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

    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
    102

    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 ygoe; January 4th, 2013 at 08:39 PM.

  4. #4
    Join Date
    Nov 2011
    Location
    /dev/root
    Beans
    Hidden!

    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
    102

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

    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

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
  •