User input, creating folders

Discuss and share scripts and script files...
Post Reply
TimTBaum
Posts: 4
Joined: 02 Jul 2020 07:21

User input, creating folders

Post by TimTBaum »

Hi,

I am a new user of the XYplorer and I am very happy that I found it.
I am also new to the scripting and I need some help from you pro users.

Is it possible to get a user input and then create multiple folders based on the input?
I have a Windows batch script which looks like this and I want to this to be executed through the XYplorerer script:

Code: Select all

REM --------------------------------------------
REM Get user path for new dir
REM --------------------------------------------
set /p newFolder="Enter new folder name: "


REM --------------------------------------------
REM Create dirs
REM --------------------------------------------
md "D:\projects\""%newFolder%""

md "D:\projects\""%newFolder%""\customer"
md "D:\projects\""%newFolder%""\customer\contracts"
md "D:\projects\""%newFolder%""\customer\misc"

REM --------------------------------------------
REM Open explorer
REM --------------------------------------------
%SystemRoot%\explorer.exe "D:\projects\"%newFolder%

Thank you in advance.

Tim
Last edited by TimTBaum on 02 Jul 2020 09:19, edited 1 time in total.

highend
Posts: 13313
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

Re: User input, creating folders

Post by highend »

One of my scripts helped you out? Please donate via Paypal

TimTBaum
Posts: 4
Joined: 02 Jul 2020 07:21

Re: User input, creating folders

Post by TimTBaum »

highend wrote: 02 Jul 2020 08:05 viewtopic.php?p=169945#p169945
PERFECT! :appl:

RalphM
Posts: 1935
Joined: 27 Jan 2005 23:38
Location: Cairns, Australia

Re: User input, creating folders

Post by RalphM »

If it is always the same subfolders you are after, you also might want to look into the capabilities of "Edit/New Items" as you can place whole folder structures (even including files) there to be copied into a new path with just a single click.
Ralph :)
(OS: W11 22H2 Home x64 - XY: Current beta - Office 2019 32-bit - Display: 1920x1080 @ 125%)

Post Reply