pBat Initialization (pBat_Auto.bat)
pBat is initialized through the execution of a batch script named pBat_Auto.bat. This file sets some variables and calls user defined scripts.
Synopsis
%PBAT_PATH%/pBat_Auto.bat
This file is not meant to be edited directly, since it calls user defined scripts. It can be nonetheless useful to modify it to fit some special requirements. If you modify it, be careful not to do anything wrong with it as it can eventually affect the behaviour of some scripts.
Usually, the file pBat_Auto.bat sets pBat global variables that are not dynamic.
Finally pBat_Auto.bat also call two user defined scripts :
-
%USERPROFILE%/.pbat/pBat_Auto.bat : User startup file
-
%PBAT_ETC%/pBat_Auto.bat : System wide startup file.
In both of these script, any pBat command can be used safely.
Note that since the first multi-threaded release 218.1, the execution of pBat_Auto.bat has changed a lot. The script gets executed upon either:
-
pBat start-up, that is when a new interpreter is launched without parents.
-
or pBat is explicitly called from a script or from the prompt. This means pBat_Auto.bat does not get executed any more upon pipe call or FOR command.
Compatibility
Not compatible with cmd.exe, the initialization mechanisms differ.
Available since 0.7.