10

This happens to me often enough , that I would like to figure it out. I'll have a code file open in Notepad, but I don't recall what directory it's located in. Sometimes, when I navigate to File --> Save As then I can see where it's at. ' enter image description here

But not always , and that's why I'm asking here. I'm hoping there's some way to do this. thanks

2
  • I found a relevant link , but nothing direct yet - autohotkey.com/board/topic/… Jan 21, 2016 at 1:53
  • Stuff like this makes me wish (even-harder) that Windows had macOS's "Proxy Icons" feature (where a fully interactable file icon in the titlebar represents the opened file on-disk) - then all I'd need to do would be to right-click on it or something.
    – Dai
    Nov 2, 2022 at 20:17

4 Answers 4

6

There isn't presently a way of doing this in Notepad other then the way you have shown using the 'Save-as' which should show the directory of the file you have open.

That being said, if you want this functionality, you can use a bunch of better applications that are also free. Such as:

Notepad++

Sublime Text Editor

UltraEdit (Might not be free anymore)

These are a few I've used, and all of them will show the directory the file has been opened from in the window name at the top left of the window.

2
  • 1
    I recommend trying Programmer's Notepad as well. Note that Sublime is not free unless you want to put up with a nag screen every so often.
    – user21820
    Jan 21, 2016 at 4:20
  • 1
    'Save-as' definitely does not show the directory of the file you have open, unless the last time you used the file open dialog, you visited that dir. If you opened the file within Notepad, it does though. Mar 19, 2019 at 2:04
8

On Windows 7 I found the trick:

You can make a small modification to the opened file and then close the notepad. Notepad will ask, if you want to save or discard your changes revealing the full path to the file being edited :)

2
  • 1
    I dont know why this was downvoted?
    – Rishav
    May 14, 2019 at 10:49
  • 1
    i.imgur.com/nL0YfVW.png this is how the save modal looks. it cannot be resized. so if the path is long, this doesn't work. but at least you can discover whether the path is long or short
    – sandrino
    Sep 19, 2023 at 10:48
6

It depends, If you opened the file directly, (which then opened notepad), you can see the 'command line' in task manager, it will have the file path listed. (to see command line, open task manager, go to details page, right click the column header and select columns).

But if you opened notepad first, and then opened the file (file->open), then no way I can see, as notepad doesn't keep an open file handle.

1
  • Really?? In Windows 7 Pro it is the opposite of what you describe, and I'm pretty sure as well on (gasp) Win 10. If you opened using file->open, it ALWAYS shows the correct dir. If you opened by going notepad foo.txt, taskman only shows notepad foo.txt - not the path. So both opposite results. What O/S did you have when you wrote that? Mar 19, 2019 at 2:08
3

Well, I think Notepad only tracks the last directory you made save as for files, However, I recommend to use another program like Notepad++, it is more efficient and will give you many features and it is still free and simple program

1
  • Please read How do I recommend software for some tips as to how you should go about recommending software. Provide at least a link, as well as some additional information about the software itself, and how it can be used to solve the problem in the question.
    – DavidPostill
    Jan 21, 2016 at 22:40

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .