Maybe this help, I have something similar @ECHO OFF :: delims is tab folowed by space FOR /F "tokens=2* delims= " %%A IN ('REG QUERY "HKLM\SOFTWARE\id\Doom 3" /v InstallPath') DO SET InstallPath=%%B ECHO InstallPath=%InstallPath% COPY .\CRACKOP.txt %InstallPath% PAUSE So I can find path in registry but rest of the command dont work. Can anyone correct that part of the command? Why file doesnt get copied in install folder of doom3 (this is just example, I put folder for doom3 because I have that key on my computer contains path to D:\Program files\Doom 3, something similar to problem that you have) I got Echo reply InstallPath=D:\Program Files\Doom 3 and now I want to copy file to that folder