Y
Y
Yuri Kovtun2019-02-27 11:12:45
PowerShell
Yuri Kovtun, 2019-02-27 11:12:45

How to create folders with nested files in PowerShell?

How to create a tree of directories and files in PowerShell with one command?
Or if you need to write a script, then tell me an example from which you can build on.

Example
|--/new_project/
               |--index.html
               |--/css/
                      |style.css
               |--/js/
                     |script.js
                     |script.min.js

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
azarij, 2019-02-27
@yKovtun

it finally dawned on me that I needed to create, not watch.
New-Item -Path c:\test\ -Name "topfolder" -ItemType Directory
New-Item -Path c:\test\topfolder -Name "file" -ItemType File
and so on. it will be problematic to create all this with one command. one script - please.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question