Page 1 of 1

Create folder structure, prompt for details.

Posted: 08 Apr 2020 09:57
by pdoyon
Hi everyone!

I am new to this forum, haven't done any programming for a while so even basic functions give me headaches, so thanks in advance for any help and/or reference to learning tools. I am afraid I am not using the correct keywords in search engines to get proper results.

I need a way to create a defined folder structure within a folder for which we ask and format relevant information. If anything can be better than batch file, I am all ears, or eyes in this case. =)

For example,

-> Execute batch file
-> Prompt First Name
-> Prompt Last Name
-> Prompt Date of Birth

-> Create Folder using formatted user input as "Last Name, First Name (YYYY-MM-DD)"
-> Insert predefined folder structure within (md, md, md, etc.)



Thanks a lot for any support! Have a great day!

Re: Create folder structure, prompt for details.

Posted: 09 Apr 2020 11:09
by warlock666999
Maybe try this:

Code: Select all

@echo off
cd /d %~dp0
set /p first= First Name:
set /p last= Last Name:
set /p birth= Date of Birth ex:01-25-2020:
mkdir "%last% %first% %birth%"
explorer %~dp0