Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $rootpath = "\\Server\Ourmedia\Pictures\from google\"
- $paths = Get-ChildItem -Path $rootpath
- Foreach($path in $paths){
- $files = "$rootpath$path\*.*"
- Foreach($file in $files){
- $date = C:\Downloads\exiftoolgui\exiftool "-DateTimeOriginal" "$file";
- $file.Parent
- If($date -eq $Null){}
- Else{C:\Downloads\exiftoolgui\exiftool "-DateTimeOriginal>FileCreateDate" "$file";}
- }
- $filesold = "$path*.*_original"
- Foreach($file in $filesold)
- {
- del $file
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement