Austin Van Alstyne
Austin Van Alstyne

Reputation: 1

How to make a batch create and write on a text file

I am trying to make a program with batch that will allow me to add and see customers for a business I work for. I have all the input stuff correct, but I can't get the program to write all the info to the file. This is what I have for that:

echo %first%, %last%, %address%, %phone%, %compmodel%, %date%, %problem%, %email% >> Customers\%date%/%last%.txt

When it gets to this part of the script, it says that it cant find the path specified. I've tried to tell it exactly where, but that doesn't work either.

Any help would be great!!!

Upvotes: 0

Views: 502

Answers (1)

wimh
wimh

Reputation: 15232

there is a / character in the filename you are trying to write to. That is not allowed.

echo %first%, %last%, %address%, %phone%, %compmodel%, %date%, %problem%, %email% >> Customers\%date%/%last%.txt

Upvotes: 2

Related Questions