-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
# Ask for the directory path:
Write-Host "Enter the directory path: "
$directory = Read-Host
$reversedDirectory = $directory -replace "/", "\"
# List of directories and files to ignore:
$ignored = @(".git", "node_modules", ".next", ".vscode")
# Loop over the directory items:
Get-ChildItem $directory -Recurse | ForEach-Object {
# Check if the item is ignored:
foreach ($ignore in $ignored) {
if ($_.FullName -like "*$ignore*") {
return
}
}
# If the item is not ignored, display it:
Write-Host $_.FullName.Replace($directory, "").Replace($reversedDirectory, "")
}
Metadata
Metadata
Assignees
Labels
No labels