1. Download dbFileStatus.exe – http://rapidshare.com/files/438523129/dist_1.0.10.rar, and extract the content of the rar file to a folder on your computer. This executable file checks the status (syncing, up-to-date, etc) of Dropbox.
2. Copy-paste the following code into a text editor.
@echo on :START "C:\The\directory\where\dbFileStatusIsStored\dbFileStatus.exe" "C:\Your\Dropbox\Location\My Dropbox" > dbstatus.txt findstr /m "up to date" dbstatus.txt if %errorlevel%==0 ( %windir%\System32\rundll32.exe powrprof.dll,SetSuspendState ) else ( SLEEP 30 GOTO START )
Update the code with your actual path to the exectutable file ‘dbFileStatus.exe’ and location of your dropbox folder, and save it as ‘DbStandby.bat’ inside the earlier extracted folder.
This script checks Dropbox status every 30 seconds. You can change the interval if you want.
%windir%\System32\rundll32.exe powrprof.dll,SetSuspendState puts the computer in to Standby or Hibernates, if enabled.
Alternatively, if you’d like the computer to shutdown, replace that line of the script with:
%windir%\System32\shutdown -s -t 00
Or to lock your computer:
3. Download sleep.exe – http://db.tt/yTIpFmwA, and copy it to the folder as well.
That’s it. Now just run the
dbstandby.bat file whenever you want to leave your computer unattended while Dropbox syncs.
If you want the ready-made script, download it from here. Extract its contents and edit the file called DbStandby.bat with the location of your Dropbox.
Don’t have a Dropbox account? Get one here.