Quantcast
Channel: The Official Scripting Guys Forum! forum
Viewing all articles
Browse latest Browse all 15028

How would I create a simple script that does these specific things?

$
0
0
I am trying to create a script that does these few simple task but I can't seem to compile all the cmdlets together into one. I can pick one task out and have a command for it but I want one script to do it all. Here are the tasks I need it to do.
      • 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)

Viewing all articles
Browse latest Browse all 15028

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>