I can use dir /s /b *.Tests.*.dll
to recursively find all files that match that pattern, but I need to also find them only if they are in \bin\Debug\
instead of \obj\Debug\
or \bin\Release
.
So I tried this command:
dir /s /b Tests\Unit\*\Debug\bin\*.Tests.*.dll
But it fails with The filename, directory name, or volume label syntax is incorrect.
I couldn't find any previous SO question that addresses this problem but if one exists please point it to me.
Is there any way to achieve the desired result (apply filter on entire path)? My intent is to use the list to run NUnit on each unit test assembly in my project under jenkins using this command from Use NUnit Console Runner to run all tests under a folder
for /f %%f in ('dir .\test\ /b /s *.Test.dll') do nunit-console /nologo /noshadow /framework:net-4.0 /xml:.\test\TestResults.xml "%%f"
On linux I would have used ls -r ... | grep ... | xargs ...
and I'm trying to achieve something similar here.
I only need to apply this additional filter on the parent folders as well. If it's not possible I'll have to use PowerShell.