i am adding a line in a .bat file look like this:
path %~dp0;%PATH%
But this message is shown:
\common was unexpected at this time.
Let me show you the path.
PATH=C:\Program Files\Common Files\Microsoft Shared\Windows Live;C:\Program File
s (x86)\Common Files\Microsoft Shared\Windows Live;c:\Program Files (x86)\AMD AP
P\bin\x86_64;c:\Program Files (x86)\AMD APP\bin\x86;C:\Windows\system32;C:\Windo
ws;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;c:\Progr
am Files (x86)\ATI Technologies\ATI.ACE\Core-Static\;C:\Program Files (x86)\Sony
\VAIO Startup Setting Tool;;C:\Program Files (x86)\Windows Live\Shared;C:\Progra
m Files\Intel\WiFi\bin\;C:\Program Files\Common Files\Intel\WirelessCommon\;C:\P
rogram Files (x86)\Common Files\Thunder Network\KanKan\Codecs;C:\Program Files\C
alibre2\
This is the path. The path i want to add (%~dp0) is:
C:\Users\Workspace\Desktop\Files\Programming\GoogleSearch\
This is important for me.
Thank you.
You could try
setx
as shown in this answer....https://serverfault.com/questions/88363/how-do-i-set-the-global-path-environment-in-a-batch-file
Related to this post (tested)
%PATH%
variable in yourset PATH=..
string.set PATH=C:\Path\to\file
instead ofset PATH=%PATH%;C:\Path\to\file
It seem to be the issue described in this article. You probably use command language construction with parentheses in your batch-file.