The filename, directory name, or volume label syntax is incorrect inside batch
The single quotes do not indicate a string, they make it starts: ‘C:\ instead of C:\ so %name% is the usual syntax for expanding a variable, the !name! syntax needs to be enabled using the command setlocal ENABLEDELAYEDEXPANSION first, or by running the command prompt with CMD /V:ON. Don’t use PATH as your name, it is a system name that contains all the locations of … Read more