How to Create a Form That Saves Answers
Open notepad by going to Start> All Programs> Accessories> Notepad., Copy and paste the following code: @echo off cls echo Please enter your name., Go to File> Save As Change the "Save as type" box to "All Files"., Open the file and the following...
Step-by-Step Guide
-
Step 1: Open notepad by going to Start> All Programs> Accessories> Notepad.
Vista and 7 users can just type "notepad"
without quotes, into the start menu and hit enter. -
Step 2: Copy and paste the following code: @echo off cls echo Please enter your name.
If you don't wish to have your name used, write "ANON" in the box below set/p "name=>" cls echo Do you wish to complete a survey? set/p "cho=>" if %cho%==yes goto :
QUIZ if %cho%==y goto :
QUIZ if %cho%==Y goto :
QUIZ if %cho%==no goto :
END if %cho%==n goto :
END if %cho%==N goto :
END cls :
QUIZ echo Q1:
How old are you? set/p "age=>" cls echo Q2:
What is your favorite colour? set/p "colour=>" cls echo Q3:
What is your favorite games console? set/p "console=>" cls echo Q4:
What is your favorite game? set/p "game=>" goto :
THANKS :
THANKS echo Thank you for completing the survey! echo A file will be created with your answers echo If you don't want your survey to be saved, close the window.
Otherwise, hit any key to create the file. pause >nul For /L %%n in (1,1,1) do echo Name:%name% Q1:%age%.
Q2:%colour%.
Q3:%console%.
Q4:%game%.
Survey filled out at %date% %time% >> %name%%%n.txt , Type "anything.bat" into file name and click "Save"
, -
Step 3: Go to File> Save As Change the "Save as type" box to "All Files".
-
Step 4: Open the file and the following window should appear:
-
Step 5: Try filling out the form and once you have finished
-
Step 6: a text file will be created with the answers saved into it.
Detailed Guide
Vista and 7 users can just type "notepad"
without quotes, into the start menu and hit enter.
If you don't wish to have your name used, write "ANON" in the box below set/p "name=>" cls echo Do you wish to complete a survey? set/p "cho=>" if %cho%==yes goto :
QUIZ if %cho%==y goto :
QUIZ if %cho%==Y goto :
QUIZ if %cho%==no goto :
END if %cho%==n goto :
END if %cho%==N goto :
END cls :
QUIZ echo Q1:
How old are you? set/p "age=>" cls echo Q2:
What is your favorite colour? set/p "colour=>" cls echo Q3:
What is your favorite games console? set/p "console=>" cls echo Q4:
What is your favorite game? set/p "game=>" goto :
THANKS :
THANKS echo Thank you for completing the survey! echo A file will be created with your answers echo If you don't want your survey to be saved, close the window.
Otherwise, hit any key to create the file. pause >nul For /L %%n in (1,1,1) do echo Name:%name% Q1:%age%.
Q2:%colour%.
Q3:%console%.
Q4:%game%.
Survey filled out at %date% %time% >> %name%%%n.txt , Type "anything.bat" into file name and click "Save"
,
About the Author
Tyler Moore
Brings years of experience writing about home improvement and related subjects.
Rate This Guide
How helpful was this guide? Click to rate: