1.

Solve : batch ????

Answer»

it has been a very long time, since DOS that I had to write natch files. I made one that creates a directory in ANOTHER location, copies files and directories for new projects. My issue is when it PROMPTS the user to input Job #, Job Name, and Job Owner, the user cannot put spaces in the name.  If they do it creates a new directory for each word typed.  I cannot like put John Doe with a space between the names, I get a directory called John and another called Doe.

set /p jobname=Enter Job Name Here

then to mkdir:
mkdir %jobname%natch files are very hard to write. I recommend you learn batch files instead. Also post in the correct section of the forum, the MICROSOFT DOS section. Finally, if you surround PATH and/or file names with double quote marks you don't have to worry about spaces.

mkdir "%jobname%"



Discussion

No Comment Found