Create folder structure, prompt for details.

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Post Reply
Message
Author
pdoyon
Posts: 1
Joined: 08 Apr 2020 09:44

Create folder structure, prompt for details.

#1 Post by pdoyon » 08 Apr 2020 09:57

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!

warlock666999
Posts: 4
Joined: 09 Apr 2020 11:05

Re: Create folder structure, prompt for details.

#2 Post by warlock666999 » 09 Apr 2020 11:09

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

Post Reply