I need to invoke an exe file in C:\\Program Files directory from a batch file.How can we mention the directory name \"Program Files\" in batch file.I am getting error like C:\\P
On my pc I need to do the following:
@echo off
start C:\"Program Files (x86)\VirtualDJ\virtualdj_pro.exe"
start C:\toolbetech\TBETECH\"Your Toolbar.exe"
exit
Now that bash is out for windows 10, if you want to access program files from bash, you can do it like so:
cd /mnt/c/Program\ Files
.
use this as somethink
"C:/Program Files (x86)/Nox/bin/nox_adb" install -r app.apk
where
"path_to_executable" commands_argument
I use in my batch files - c:\progra~2\
instead of C:\Program Files (x86)\
and it works.
While createting the bat file, you can easly avoid the space. If you want to mentioned "program files "folder in batch file.
Do following steps:
1. Type c:
then press enter
2. cd program files
3. cd "choose your own folder name"
then continue as you wish.
This way you can create batch file and you can mention program files folder.
Surround the script call with ""
, generally it's good practices to do so with filepath.
"C:\Program Files"
Although for this particular name you probably should use environment variable like this :
"%ProgramFiles%\batch.cmd"
or for 32 bits program on 64 bit windows :
"%ProgramFiles(x86)%\batch.cmd"