PowerShell script organizes pictures in your OneDrive camera roll folder

I just published a new PowerShell script that organizes pictures in your OneDrive camera roll folder. It creates folders named after the year and month, then moves picture files to them. Existing files will be renamed in case of conflict. Empty folders left behind after the files are moved will be removed.

 It defaults to your OneDrive camera roll folder, but you can use a parameter to specify another folder. There are also parameters to skip confirmation, skip existing files in case of conflict and avoid removing empty folders at the end.


This script will reorganize all the files at the given folder and all subfolders.
Files will be moved to a folder named after the year and month the file was last written.
This operation cannot be easily undone. Use with extreme caution.


You can download the script from the TechNet Gallery at



Comments (2)
  1. Romans says:

    thanks a lot! useful script! used it fo my 16GB Camera Roll folder 🙂

  2. Walaa says:

    Simply wow… thanks a lot for taking the time and solving a daily issue…
    Can I request extra help? is there a way to have a scheduled task copy from the One Drive to specific folder in google drive and vise versa?

Comments are closed.

Skip to main content