open a file with cmd script or batch file | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

open a file with cmd script or batch file

I want to open a file with extension ".ipynb" (EX anyfile.ipynb) in jupyter-lab There are many options I know to do this like... 1)open cmd window in current working directory and execute "jupyter-lab anyfile.ipynb". 2)create cmd script with command "jupyter-lab" in cwd and run it by double click. But I want to do is that convert all .ipynb files to open with a cmd script or batch file that is not in cwd and situated in some folder in C: drive currently all my .ipynb files opens with sublime Image I know I have to change it but for that I have to create a script Question: how to access file(which is called the script) path in cmd script or batch file? https://stackoverflow.com/questions/73677653/open-a-file-with-cmd-script-or-batch-file

11th Sep 2022, 8:32 AM
Pranav Hirani
Pranav Hirani - avatar
6 Answers
+ 3
can you run $ where Jupyter-lab on powershell without $ to find its path maybe ? Because there's nothing like its command xD ... everything is an executable hiding somewhere in your PC
12th Sep 2022, 1:40 AM
Prashanth Kumar
Prashanth Kumar - avatar
+ 1
assuming you're on windows right click on any .ipynb in the dialog box select open with and the last option which would be like other program ... there you can browse and select jupyter-lab after that dont forget to check a checkbox that will appear after it... it will be like always open .ipynb in jupyter-lab ..
11th Sep 2022, 9:32 AM
Prashanth Kumar
Prashanth Kumar - avatar
+ 1
Oh yeah 😅 I finally found it Thank you Prashanth Kumar Just the thing I don't know that it's somewhere in my pc and I have to found it
12th Sep 2022, 8:09 AM
Pranav Hirani
Pranav Hirani - avatar
0
Prashanth Kumar Jupyter-lab is a command in cmd Not any executable
11th Sep 2022, 5:11 PM
Pranav Hirani
Pranav Hirani - avatar
0
Prashanth Kumar btw i know that method If Jupyter-lab available in the open with menu then why I ask this question?
11th Sep 2022, 5:13 PM
Pranav Hirani
Pranav Hirani - avatar
0
Anyway Prashanth Kumar thanks for the help
11th Sep 2022, 5:14 PM
Pranav Hirani
Pranav Hirani - avatar