Jump to content

File explorer sort by day of the week? Or programs that can?

Apologies in advanced, I'm hoping I'm asking in the right place.
Here's what I got. I received a large file with of a couple years worth of time-lapses from my dad for a work thing he is doing. He asked me if I could remove every video that is recorded on either a Sunday or Saturday. Either me or Windows 10 is dumb because using file explorers advanced search tools I could find a way to make this specific kind of search. The video names are just numbered but the date modified are all accurate to the day recorded. I read that you could plug "created:saturday" into the search engine but this turned out to be false in my efforts. Is there any way to get file explore to isolate by day of the week? If there isn't as I suspect, does anyone know of any reliable programs I can use to do this task?

Link to comment
Share on other sites

Link to post
Share on other sites

24 minutes ago, Haraikomono said:

create yourself a simple challenge:

 

learn how to write a simple powershell script that does it for you

Agree with this, powershell is the fastest way. 

 

@No sleep Neftali

 

$dir = Read-Host "Enter folder to sort"
$dest = Read-Host "Enter folder to move unwanted files to"

$ItemsToRemove = Get-ChildItem $dir -Force -Recurse -ErrorAction Ignore | Where-Object {($_.CreationTime.DayOfWeek -eq "Saturday") -or ($_.CreationTime.DayOfWeek -eq "Sunday")}
$ItemsToRemove | Move-Item -Destination $dest -force

"`n"
Write-Host "Items moved: `n"
$ItemsToRemove.Name
"`n"
pause

 

 

This moves file rather than deleting them, so if anything gets moved accidentally, you still have them available. 

If you just want to remove them and not bother moving them, replace line 5 with this:

$ItemsToRemove | Remove-Item -Recurse -Force

EDIT: Added a list of items moved

 

 

Remove Items create on Saturday and Sunday.ps1

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×