Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/file/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/batch-file/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
File 将字符串传递给批处理变量并创建文件_File_Batch File_Io - Fatal编程技术网

File 将字符串传递给批处理变量并创建文件

File 将字符串传递给批处理变量并创建文件,file,batch-file,io,File,Batch File,Io,我们可以动态地将字符串传递给已定义的批处理变量吗?类似于以下定义: 输入您的组织名称: 输入您的姓名: |>按回车键 echo%%Org\u name>>Org\u name.txt echo%%User\u name>>Org\u name.txt 现在这些将保存到Org_name.txt文件中。有可能吗?引导我,谢谢:)是的,你可以: set /p "org_name=Enter your Organization name: " set /p "user_name=Enter your N

我们可以动态地将字符串传递给已定义的批处理变量吗?类似于以下定义:

输入您的组织名称:

输入您的姓名:

|>按回车键

echo%%Org\u name>>Org\u name.txt

echo%%User\u name>>Org\u name.txt

现在这些将保存到Org_name.txt文件中。有可能吗?引导我,谢谢:)

是的,你可以:

set /p "org_name=Enter your Organization name: "
set /p "user_name=Enter your Name: "
echo %Org_name%.>>Org_name.txt
echo %User_name%.>>Org_name.txt