Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # working directory path
- $workd = "c:\mydir"
- # Check if work directory exists if not create it
- If (!(Test-Path -Path $workd -PathType Container))
- {
- New-Item -Path $workd -ItemType directory
- }
- Echo "creating file"
- Set-Content "$workd\myfile.txt" "this is a test"
- Add-Content "$workd\myfile.txt" "the end"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement