How do I get the Terminal command files (.command files) ask for words?
.command scripts run in Terminal windows (that is, when you double-click a .command file, it opens a Terminal window, and you can use that window to interact with the script). You can use that to prompt the user and get input; exactly how you do that depends on the scripting language you're using (which is determined by the shebang (starts with #!) line at the beginning of the script. In bash, you'd do something like:
#!/bin/bash

read -p &quot;Continue to make directory? y/n &quot; makedir
if [[ &quot;$makedir&quot; = [Yy] ]]; then
    mkdir somedirectory
fi

In zsh, the syntax for adding a prompt to the read command is different, and it has a -q option specifically for y/n questions (that succeeds if the answer is &quot;y&quot; or &quot;Y&quot;, and can be used directly in an if):
#!/bin/zsh

if read -q &quot;makedir?Continue to make directory? y/n &quot;; then
    mkdir somedirectory
fi

In other languages, you'd do... whatever you do in that language to prompt for and accept input.