Let’s dissect it. There are three parts:
cd— This is change directory command./d— This switch makescdchange both drive and directory at once. Without it you would have to docd %~d0 & cd %~p0. (%~d0Changs active drive,cd %~p0change the directory).%~dp0— This can be dissected further into three parts:%0— This represents zeroth parameter of your batch script. It expands into the name of the batch file itself.%~0— The~there strips double quotes (") around the expanded argument.%dp0— Thedandpthere are modifiers of the expansion. Thedforces addition of a drive letter and thepadds full path.