PowerShell Enumerate Folder with -exclude and returning resulting folders/files

Create a Batch file containing the following:

@echo off
@echo 100...
@powershell "Get-ChildItem -Path \\192.168.1.1\Data\Splitting\100_*.* | Select-Object FullName"
@echo Alle anderen (ausser excluded)...
@powershell "Get-ChildItem -Path \\192.168.1.1\Data\Splitting\*.* -Exclude @('100_*.*','_a file to exclude containing Spaces.bat') | Select-Object FullName"
pause

One thought on “PowerShell Enumerate Folder with -exclude and returning resulting folders/files”

  1. Update on July 21, 2025

    Comments can now only be submitted by the administrator – this functionality has been added.

    Thank you for your understanding.

Comments are closed.