change working dir to script dir

The working dir doesn't necessarily match the script's path, depending on how the script is called. All relative paths and conditional statements using EXIST will fail whenever the working dir is not the script's own location. This fixes that.
This commit is contained in:
claustromaniac 2018-08-11 22:55:51 -03:00
parent 3739dae41f
commit 647f83a021
2 changed files with 5 additions and 2 deletions

View File

@ -3,7 +3,9 @@ TITLE prefs.js cleaner
REM ### prefs.js cleaner for Windows
REM ## author: @claustromaniac
REM ## version: 2.1
REM ## version: 2.2
CD /D "%~dp0"
:begin
ECHO:
@ -11,7 +13,7 @@ ECHO:
ECHO ########################################
ECHO #### prefs.js cleaner for Windows ####
ECHO #### by claustromaniac ####
ECHO #### v2.1 ####
ECHO #### v2.2 ####
ECHO ########################################
ECHO:
CALL :message "This script should be run from your Firefox profile directory."

View File

@ -7,6 +7,7 @@ REM ## version: 4.6
REM ## instructions: https://github.com/ghacksuserjs/ghacks-user.js/wiki/3.3-Updater-Scripts
VERIFY ON
CD /D "%~dp0"
SET _myname=%~n0
SET _myparams=%*
:parse