Batch file output to network path truncates first character.
Posted: 04 Mar 2013 20:34
Hi guys, I have a batch file problem in here. Trying to save an output log into a networkpathed text file, but the front letter is missing... e.g "myname" becomes "yname" -> http://pastebin.com/GSWMhwm6
what the output should be
testdomain\username
what the output in the text file shows
estdomain\username
Code: Select all
SET destpath="\\networklogs\measure_sw_usage\extractinfo_%COMPUTERNAME%.txt"
for /f "skip=2 tokens=1,* delims=," %%A IN ('wmic computersystem get username /format:csv') DO (echo %%B >>%destpath%)
what the output should be
testdomain\username
what the output in the text file shows
estdomain\username