How to handle carriage return with windows batch script?
- by eric2323223
Hi,
I want to use bat to automate some of my work. It should first look up the value of a certain registry key, and then copy some files to the directory that included in the registry key value.
I used reg query command to look up registry, such as:
REG QUERY "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Environment" /v PROCESSOR_ARCHITECTURE
The result seems contains carriage return and I need to remove it, I've tried some solutions but all failed. Could anyone help me?