If you are new to Powershell, start by downloading and reviewing this document.
https://www.sapien.com/books_training/Windows-PowerShell-4
Ignore the Oracle requirement initially. Start by putting a few user id's in a text file and use that to do initial testing. Build sections of code, test them, and then add to it. Start with looping through the id's.
$UsersHome = '\\server\share'
$AllIds = Get-Content 'C:\temp\ids.txt'
foreach ($id in $AllIds) {
"Processing $id"
}
Then use the id to find the subdirectory. You may find more than one.
$UserFolders = Get-ChildItem -Path $UsersHome -Directory -Filter $id -Recurse
foreach ($uf in $UserFolders) {
"I found this folder {0}" -f $uf.fullname
}
Then look for the photo files.
$jpgs = Get-ChildItem -Path $uf.fullname -Filter *.jpg
foreach ($pic in $jpgs) {
$age = New-TimeSpan -Start $pic.LastWriteTime -end (Get-Date)
"{0} was modified {1}, it's age in days is {2}" -f $pic.name, $pic.LastWriteTime, $age.Days
}
At this point, you test the age and copy or move the items that you want. If you don't want to process all jpg files, you could hard code the 3 that you are interested in. Use Test-Path to verify that they exist. Use Move-Item or Copy-Item.
Add the -Whatif switch when first testing to verify that you have the correct destination folder/file name.