When using Notepad++, i used run.. command to run a .bat file in a folder but when i am running it, the bat file goes to notepad++ directory and then runs itself. '''C:/Program Files/Notepad++''' Is There Any way so that i can run it from current directory where it is saved. Update 1:I Created A Batch File That Inspects all java Files present in the folder where the batch file is kept And Compiles Them, it uses %cd% as locating the folder so when i want it to run from notepad++ v7.8.4. It Takse that batch file and keeps it in C:/Program Files/Notepad++ and then runs the batch file but i want notepad ++ to run it from the current directory where i have kept the batch file. run in notepad++ can be opened by pressing F5. thanks
Asked
Active
Viewed 734 times
-1
-
1Does this answer your question? [Running File from Notepad Plus Plus and Current Directory](https://stackoverflow.com/questions/39192941/running-file-from-notepad-plus-plus-and-current-directory) – AdrianHHH Feb 14 '20 at 17:28
-
no, I tried it earlier, it did not work in npp v.7.8.4. – Garvit Joshi Feb 15 '20 at 09:41
-
2Please [edit] your question to explain what you have tried, what version of Notepad++ you are using, what happened when you tried the suggested duplicate, and any other related information. – AdrianHHH Feb 15 '20 at 14:42
-
Sir,You are Misunderstanding Me. the Problem Here Is I Have Edited Shortcts.xml File Many Times But It Doesn't Come In Menu=> Run. – Garvit Joshi Feb 17 '20 at 03:45
-
The updated question is very difficult to understand. Capitalising the first letter of (almost) every word also makes it hard to read. – AdrianHHH Feb 17 '20 at 09:33
1 Answers
0
Sir, @AdrianHHH I Got It , the problem was i was editing the wrong xml file. the file which was responsible was is%APPDATA%/Roaming/Notepad++/shortcuts.xml. There is the exact copy of shortcuts.xml which works fine.
<Command name="CD and run file" Ctrl="no" Alt="no" Shift="no" Key="0">cmd /C "cd /d $(CURRENT_DIRECTORY) && $(FULL_CURRENT_PATH)"</Command>
Sir Can You Please Edit The Above Code SO I Can Run My Executor Java.bat from It. Thanks Assuming my Bat File IS In :D:\Projects\Java\Java Executor

Garvit Joshi
- 103
- 1
- 10
-
Is this an answer to your original question? Or, is it a new question? Please read the [help] pages for this site where it clearly states the distinction between answers and questions. – AdrianHHH Feb 17 '20 at 09:35
-
As Per your request i have made another question : https://stackoverflow.com/questions/60261732/notepad-run-a-batch-file-from-current-directory . – Garvit Joshi Feb 17 '20 at 11:47