Advertisement
tankcr

ChangePics

Oct 13th, 2015
202
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. $rootpath = "\\Server\Ourmedia\Pictures\from google\"
  2. $paths = Get-ChildItem -Path $rootpath
  3. Foreach($path in $paths){
  4. $files = "$rootpath$path\*.*"
  5.  
  6. Foreach($file in $files){
  7. $date = C:\Downloads\exiftoolgui\exiftool "-DateTimeOriginal" "$file";
  8. $file.Parent
  9.  
  10. If($date -eq $Null){}
  11.  
  12. Else{C:\Downloads\exiftoolgui\exiftool "-DateTimeOriginal>FileCreateDate" "$file";}
  13.  
  14.  
  15. }
  16. $filesold = "$path*.*_original"
  17.  
  18. Foreach($file in $filesold)
  19.     {
  20.     del $file
  21.     }
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement