Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

The homework is in powershell script, i have to make a menu that takes input from the user and makes a file, if the user

The homework is in powershell script, i have to make a menu that takes input from the user and makes a file, if the user inputs 2, 3 or bigger number, then makes multiple files like file file1 file2....., I made the program but cant fix the loop to make multiple files, how i will make the loop make multiple files ????

image text in transcribed

$filename = Read-Host "Name File" $desti Read-Host "File Path" $number = Read-Host "Number of files" 5 6 7 8 9 10 11 for ($number -lt Snumber; $number++){ if( $number -ge "1" ) { New-Item -Path $desti -Name $filename$number -ItemType "file"} elseif ($number -eq "0") {Write-Host "You must select at least one file to be created"} elseif ($number -gt "0" ) {New-Item -Path $desti -Name $filename ItemType "file"} else {pause

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Processing Fundamentals Design And Implementation

Authors: KROENKE DAVID M.

1st Edition

8120322258, 978-8120322257

More Books

Students also viewed these Databases questions

Question

2. List the advantages of listening well

Answered: 1 week ago