Home > Mobile >  How to open a file without knowing its exact location in cmd
How to open a file without knowing its exact location in cmd

Time:12-11

Does anyone know if I can open a file in command prompt without knowing its exact location, but knowing it's exact name and file extension? I want to create a .bat file that opens another .bat file. The issue is that if I share the batch script(s) with any friends, they won't have the batch file(s) in the same directory I'm storing them in, which means if I specify where the file is, it will only work in that exact directory. Please Help!

CodePudding user response:

I figured out that if I do start cmd /k call [Filenamehere].bat it will work! But I'm going to leave this open, so that if anyone has the same question than this is the answer

CodePudding user response:

so if you have a script example :

@echo off mode 80,50 systeminfo | find "OS Name" >

  • Related