Solved

Batch File Variables

Posted on 2004-10-07
2
239 Views
Last Modified: 2010-04-17
I would like to know how to copy variable information to a text file. My variable would be set up like this:
set /p fname=Type your first name:
For this instance, I would want to copy %fname% to a text file called log.txt.
 
0
Comment
Question by:foxdesignz
  • 2
2 Comments
 
LVL 7

Expert Comment

by:LRHGuy
ID: 12254122
Try:

copy %fname% log.txt

or maybe,

echo %fname% > log.txt

if you want the name put into the file
0
 
LVL 7

Accepted Solution

by:
LRHGuy earned 50 total points
ID: 12254127
Or:

echo %fname% >> log.txt

to append the value of fname to the log.txt file.
0

Featured Post

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
This article will show, step by step, how to integrate R code into a R Sweave document

831 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question