Notepad3 icon indicating copy to clipboard operation
Notepad3 copied to clipboard

Questions about file paths

Open kidzgy opened this issue 1 year ago • 0 comments

@echo %cd%
@echo %~dp0
@pause>nul

Copy the above text in the test.bat file and place the test.bat file on a network disk (e.g. NAS). The network disk drive letter I mapped via Windows Explorer or Raidrive is the Z drive. For example, my path is “Z:\Download\test.bat”. But the path shown in notepad3 is “\\RaiDrive-Administrator\Synology\Download\test.bat”.

So, double-clicking on the bat file as well as running the document in the Notepad3 editor produces different paths.

For example, when I double-click on a bat file in File Explorer, this is what I get: 20240914100642

If you click on the “Execute Document” button in Notepad, the result will look like this: 20240914100724

I wonder if there is an option to display the path in two ways, one is to display the path shown by Explorer, i.e. “Z:\Download\test.bat”, and the other is to display the network path, i.e. “\RaiDrive-Administrator\Synology\Download\test.bat”.

That said, displaying the network path is not really useful, as it affects the result of the Execute Document.

kidzgy avatar Sep 14 '24 02:09 kidzgy