Text file creation question

March 22, 2011 at 11:48:53
Specs: Windows XP
My batch file creats text files that will be automatically inserted into our manuals. However its proving to not really save us much time because after the text that it inserts to the next line. Which I can and always go in and delete it. I guess it would just be more usefull if it didn't do this. Im not going to post the whole script cause its huge, I'll just post one of the .txt file creation:

echo %paramC%> C:\batch\dir\%Param%\%Param%-1\Equip_Desc.txt

pretty simple actually, I just dont know how to tell it to exclude [Enter] so the cursor stays behind the last letter in the txt file

See More: Text file creation question

Report •

March 22, 2011 at 12:51:38
need the code that builds %paramC%.

Report •

March 22, 2011 at 13:19:00
SET /p paramC=-1 Description:
ECHO %paramC%

Report •

March 22, 2011 at 16:33:37
It sounds like you don't want the new line echo adds at the end, it's possible to use "set /p" for this:

< nul >> "C:\batch\dir\%Param%\%Param%-1\Equip_Desc.txt" set /p "=%paramC%"

Caveat: The first character of %paramc% can't be "=" because set /p will error out if it is. It's fine anywhere else in the string, just not at the very beginning.

Report •

Related Solutions

March 23, 2011 at 07:38:01
Works Great! Thanks for informing me of a new way that I didnt know of!

Report •

Ask Question