set myPATH="C:\Users\DEB\Downloads\10.1.1.0.4"
cd %myPATH%
-
The single quotes do not indicate a string, they make it starts:
'C:\
instead ofC:\
so -
%name%
is the usual syntax for expanding a variable, the!name!
syntax needs to be enabled using the commandsetlocal ENABLEDELAYEDEXPANSION
first, or by running the command prompt withCMD /V:ON
. -
Don’t use PATH as your name, it is a system name that contains all the locations of executable programs. If you overwrite it, random bits of your script will stop working. If you intend to change it, you need to do
set PATH=%PATH%;C:\Users\DEB\Downloads\10.1.1.0.4
to keep the current PATH content, and add something to the end.