File 批处理:设置批处理创建的文件的路径
我正在尝试创建一个小程序,它将在c-drive上创建一个.txt文件。它应该向其中添加%random%的文本,但是如何设置路径File 批处理:设置批处理创建的文件的路径,file,batch-file,random,cmd,File,Batch File,Random,Cmd,我正在尝试创建一个小程序,它将在c-drive上创建一个.txt文件。它应该向其中添加%random%的文本,但是如何设置路径 type %random% > c:\create.txt ->这会将%random%的内容添加到文本文件create.txt中。 ->如果您已经知道%random%的路径,可以将其设置为环境变量。 ->否则,可以使用echo命令。echo%random%>c:\path\file.txt?
type %random% > c:\create.txt
->这会将%random%的内容添加到文本文件create.txt中。->如果您已经知道%random%的路径,可以将其设置为环境变量。
->否则,可以使用echo命令。
echo%random%>c:\path\file.txt
?