|I can figure this out myself but don't have the time this week. In light of others gaining the benefit of the knowledge, I am posting this question here:|
How can I get blank spaces automatically added when a BAT file user enters information at the prompt?
e.g.: User is asked to enter a telephone number. When the user enters the first number, a space is automatically added. When they enter the second set of numbers (which are 3 in the USA), another space is added and so forth. Of course the last four numbers do not get a space added afterwards.
set /p tPHONE=Enter Telephone:
This would be the prompt code.
I have a ghetto work-around that works but I wanted to see if someone could share with everyone else a more practical prose in coding. As I said, I can write this myself but don't have the time this week (and already have a functional code for it written).
How would you tackle this problem?