RE: [Batch] Help w/ Wierd Spacing Issue 03-23-2014, 01:45 AM
#11
That sounds like a make belief story to me, no that's not it. Post your code in code tags please.
No spaces...
Code:
@echo off& setlocal enabledelayedexpansion
set outfile=Z:\batch.txt
:: save to file
set name=Bob
echo %name%> %outfile%
call :get_name
:: resave the name to file
echo %name%> %outfile%
call :get_name
:: dummy if statement (just for proof)
set name=Billy
if 1==1 echo %name%> %outfile%
call :get_name
goto :eof
:: grab name from file and show value
:get_name
set /p name=<%outfile%
echo Variable created from file: %name%
goto :eofNo spaces...
Code:
Variable created from file: Bob
Variable created from file: Bob
Variable created from file: Billy
(This post was last modified: 03-23-2014, 02:00 AM by 0xDEAD10CC.)
![[+]](https://sinister.ly/images/modern/collapse_collapsed.png)



![[Image: inkexplosion.jpg]](http://i0.wp.com/techverse.net/wp-content/uploads/2013/09/inkexplosion.jpg)