Skip to content

Instantly share code, notes, and snippets.

@sub314xxl
Created October 8, 2019 07:29
Show Gist options
  • Save sub314xxl/e15a5ef1614b6f12d579eb5451c36b32 to your computer and use it in GitHub Desktop.
Save sub314xxl/e15a5ef1614b6f12d579eb5451c36b32 to your computer and use it in GitHub Desktop.
# Provide Folder name and create
$Folder=’C:\Demo’
New-Item -ItemType Directory -Path $Folder
# Create a series of 10 files
for ($x=0;$x -lt 10; $x++)
{
# Let’s create a completely random filename
$filename=”$($Folder)\$((Get-Random 100000).tostring()).txt”
# Now we’ll create the file with some content
Add-Content -Value ‘Just a simple demo file’ -Path $filename
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment