create a file and save in a specified directory

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Post Reply
Message
Author
tinfanide
Posts: 117
Joined: 05 Sep 2011 09:15

create a file and save in a specified directory

#1 Post by tinfanide » 08 Nov 2011 01:09

Code: Select all


:: locate a directory
cd c:\test\
:: create a file & save it under the directory
echo > test.txt



Is there a single line of commands that can do the same thing to the above one?

OJBakker
Expert
Posts: 88
Joined: 12 Aug 2011 13:57

Re: create a file and save in a specified directory

#2 Post by OJBakker » 08 Nov 2011 01:24

use full path to test.txt

Code: Select all

echo > c:\test\test.txt

Post Reply