, ,

I often take a photo with my phone so that I can use it on my PC. I use OneDrive’s automatic Camera Roll upload so it goes upto OneDrive in the cloud. Sometimes the PC does not notice the change in cloud and bring down the file.

To force the PC to sync it is only necessary to touch a file in a monitored directory. I do this with a simple batch file that I run using a desktop shortcut.

rem James Bayley
rem MIT licence
rem call this file sync-onedrive.bat and put it in your path
rem within a folder in your OneDrive directory
rem http://www.sprint.net.au/~terbut/usefulbox/msdoscmds.htm
rem http://stackoverflow.com/questions/7249233/how-do-i-touch-a-file-with-standard-windows-commands
copy sync-onedrive.bat /B+ ,,/Y

I have created a folder in my OneDrive directory called “Batch” and added it to my PATH.