Z
Z
Zinaida Frolova2020-08-28 20:51:47
cmd/bat
Zinaida Frolova, 2020-08-28 20:51:47

Why doesn't the batch file output the tree to a file?

There is a task - to create a batch file that creates a folder, and in it - a file with a directory tree and the current date. The batch file does everything except the directory tree. What am I writing wrong?
MD C:\User6
echo Start
echo tree%C:\tp70%> C:\User6\test.txt
echo %date:~-8%>C:\User6\test.txt
echo Stop

Answer the question

In order to leave comments, you need to log in

1 answer(s)
W
wisgest, 2020-08-29
@frlz

Before , otherwise the file will be output just the line treeafter . In the next command, instead of , it is necessary that the file be appended, and not overwritten. echoecho>>>

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question