Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
%~dp0returns the script's folder location.%cd%is the current folder your shell is running from.%~dp0
either copy it to that location and run the copy or modify the content of the .bat. @garlin told you the correct information as to what is running it from the script dir.I don't understand howcan find the location of the script.Code:%~dp0
When a command prompt is opened it starts in C:\users\user (for me). Now the script is in A:\scripts\new tests.
How can I run that script from C:\users\user where it assumes it is actually in A:\scripts\new tests?
@echo off
@echo Script path is %~dp0
@echo Current path is %cd%
@echo.
@echo DIR of Script path
dir %~dp0
@echo.
@echo DIR of Current path
dir %cd%
for /?. You'll see the variables near the end: ~d, ~p, ~x, etc.