2013-03-29 66 views
0

我們可以動態地將字符串傳遞給定義的批處理變量嗎?如以下定義:將字符串傳遞給批處理變量並創建文件

Enter your Organization name:

Enter your Name:

|>按Enter鍵

echo %%Org_name >> Org_name.txt

echo %%User_name >> Org_name.txt

現在這些將被保存到文件Org_name.txt 。有可能嗎?引導我,謝謝:)

回答

0

是的,你可以:

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 
相關問題