How To Auto ShutDown Your Computer After Dropbox Finishes Downloading All Files

Dropbox is one of the best ways to backup files and folders to a cloud server. It’s also one of my favorite tools for syncing files across multiple computers and mobile devices, nothing beats the simplicity and ease of use of Dropbox. Just run the client, drop the folders and forget !

I am an avid user of online back up services like Windows Live Skydrive and Mozy but always prefer Dropbox for quick backups, syncing and sharing folders across multiple computers.

One of the limitations of Dropbox is that there is no way to turn off the computer, once Dropbox file sync is complete.  I use this Firefox extension to shut down the computer after file downloads, so it would be great if the same thing is applicable for Dropbox too.

Let’s say you have reinstalled Windows and want to download all the files from your Dropbox account.  It’s already past midnight and you want a quick way to download all the data from your Dropbox folder and auto shutdown the computer after Dropbox sync activity is complete. How do you do that ?

Normally, you would have to wait until Dropbox finishes downloading all files and then put the computer to sleep mode. You may also choose to pause the sync activity but that won’t help much. This is because shutting down the computer won’t resume the sync activity from the point you left off.

Automatically Shutdown Your Computer After Dropbox File Sync Is Complete

Here is a nifty little Dropbox add-on which can check the status of Dropbox sync activity using a Batch script and put your computer to standby or sleep mode after the sync activity is complete. Following are the steps involved to use the script with your own Dropbox account:

1. Download the Folder Status Dropbox add-in (Check the Python source code by Steve )

2. Unzip the package on your computer and copy the path of the folder.

3. Open command prompt and change the directory to that folder. For example: If you have placed the folder on E:\DBS, type E: followed by cd DBS as shown below

Dropbox Folder Status4. Now type the following command exactly as written below:

dbFileStatus “D:\My Dropbox” // replace D:\My Dropbox with the actual location of your Dropbox folder.

5.  Close the command prompt window, open windows notepad and paste the following code :

@echo off
“E:\DBS\dbFileStatus.exe” “D:\My Dropbox” > dbstatus.txt
findstr /m “up to date” dbstatus.txt
if %errorlevel%==0 (
%windir%\System32\rundll32.exe powrprof.dll,SetSuspendState
) else (

Note: Remember to replace E:\DBS\dbFileStatus.exe with the actual location of the Folder status Dropbox add-in and D:\My Dropbox with the actual location of your “My Dropbox” folder.

Here is how the code looks on my computer:

6. Save the notepad file as anyname.bat on your desktop or any other location of your choice. Be sure to pull up the file type menu and choose “All Files” instead of choosing “Text document”.

7. All done!

How The Script Works

Whenever you double click the Batch file, it starts checking for a simple text file (dbstatus.txt) saved to the DBS folder with the status “up to date”. The script runs recursively and keeps on checking that text file until it encounters the “up to date” status.

When Dropbox sync activity is complete, the status is automatically changed to “up to date” and the script shuts down the computer on it’s own.

Hence, you will need to start the sync activity, and double click the batch file only once. Then you can go elsewhere and let the script automatically put your computer to sleep mode, when Dropbox has finished it’s entire sync activity.

When Will You Need This ?

You will only need this script only when you have a large amount of data waiting to be downloaded from your Dropbox account. If your Dropbox sync status is already up to date, don’t run the script.

This is because as soon as you run the script, your computer will go to sleep or stand by mode as the status will be “up to date” by default.

The DB Status Add-in works perfectly well for Windows XP and Windows 7, although I ran into some problems getting it working on my computer. When the first time I ran the Batch file, the code went into an infinite loop, as shown below:

If you see the same command prompt window after executing the Batch file, try this alternate Dropbox Status Checker Package for Windows7 (courtesy EMT on Dropbox Forums).

Download the package and update the UpToDateStandby.bat file with all the credentials. It worked like a charm !

Thank you Ashish Mohta for the hat tip.

Be sure to check out our earlier tutorials on Dropbox and some advanced customizations at the following links:

1. Dropbox Tips and Tricks – your guide to everything Dropbox
2. Sync Files and folders outside the MyDropbox folder

How do you like the idea of shutting down your computer after Dropbox sync activity ? Let us know your thoughts and ideas in the comments below.

Related articles

Fix Instagram Keeps Crashing Or Not Working Issue

Top 10 Live TV Streaming Sites To Watch News, Sports, Movies

14 Less Known Command Prompt Tricks You Should Know

Best Wireless Routers With 5 GHz Band

Best 6 Wireless Routers With 5 GHz Band 

Leave a Reply

Your email address will not be published. Required fields are marked *