Added parameter for source folder with fallback prompt if not provided

This commit is contained in:
Arash-Seifi
2025-01-29 20:07:03 +03:30
parent 13244e37fe
commit 068c711b94
2 changed files with 24 additions and 5 deletions

View File

@ -1,5 +1,11 @@
# Set the source folder containing the fonts, Like the example below
$sourceFolder = "D:\related\FONT"
param(
[string]$sourceFolder = ""
)
# If no parameter is given, prompt the user for the source folder
if (-not $sourceFolder) {
$sourceFolder = Read-Host "Please enter the path to the source folder"
}
# Set the destination folder for fonts, you don't need to change this
$fontsFolder = "$env:SystemRoot\Fonts"