# Ask for confirmation
Write-host "Creating $amount test files in $path" -ForegroundColor Cyan
$reply = Read-Host -Prompt "Is this correct? [Y] Yes [N] No "
# Check the reply and create the files:
if ( $reply -match "[yY]" ) {
# Create files
1..10 | ForEach-Object {
$newFile = "$path\test_file_$_.txt";
New-Item $newFile
}
}