The window resizing trick shared by Dave works great for the majority of cases. In my case, I had over 25,000 images extracted from a video and I needed every other image deleted. Waiting for the drag to select all the files took longer than I was willing to wait!
My files were named in the same pattern as yours (file0001.jpg
, file0002.jpg
, etc). Since I wanted every other file, I knew the files I wanted would either end in a 0,2,4,6, or 8.
To select the relevant files, I entered *0.jpg OR *2.jpg OR *4.jpg OR *6.jpg OR *8.jpg
in the search box of windows explorer while I was in the folder with all my images. I then pressed Ctrl+A
to select all, then hit delete
and I was done!
This trick will only work to select every x
numbered items where x
is a factor of 10 (so 1,2,5, or 10) but the click and drag should work for any interval.
So this method is fastest but the click and drag method is more flexible. Choose whichever one best suits your needs.
Get-ChildItem | Where-Object {$_.Name -match "[0,2,4,6,8]$"}
will list all files ending with an even number, then you can pipe this list to some other command (eg. I would use move to move them to another directory)