So I have to come up with a script that will achieve the following. I’ve got all but the loop any help would be appreciated.
store the current location (as in C:\scripts)
test to see if a folder C:\output exists, if it does not, create it
prompt the visitor for a folder name (no C:)
obtain a directory listing of that folder showing all .ps1 files only
place the results of this listing in a file named PS1_files_[folder name].txt in the c:\output folder
repeat this task as part of a loop until an empty string is entered
restore the present location (for example C:\scripts)
This is what I currently have.
$FolderName = Read-Host “FolderName”
If (!(Test-Path -Path C:\output))
If ($FolderName -eq $True)
}While($FolderName -eq “*”)