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...

6 Steps 1 min read Medium

Step-by-Step Guide

  1. 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.
  2. 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"

    ,
  3. Step 3: Go to File> Save As Change the "Save as type" box to "All Files".

  4. Step 4: Open the file and the following window should appear:

  5. Step 5: Try filling out the form and once you have finished

  6. 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

T

Tyler Moore

Brings years of experience writing about home improvement and related subjects.

46 articles
View all articles

Rate This Guide

--
Loading...
5
0
4
0
3
0
2
0
1
0

How helpful was this guide? Click to rate: