Please enable JavaScript to view this site.

FolderSizes Help

Navigation: Using FolderSizes > Command Line Support

Scheduling Execution

Scroll Prev Top Next More

You can use the Windows Scheduled Tasks facility to execute FolderSizes on a scheduled basis.

 

Important Note: As of FolderSizes v4.6, a fully integrated task scheduler is available and can be used to formulate command line arguments as well as schedule execution of various FolderSizes reports. The integrated task scheduler can be used in place of interacting with the Windows Task Scheduler.

 

As an example of how this powerful capability might be used, you could create a scheduled task that uses FolderSizes to scan a remote (network) file system and then export the results as HTML directly into a sub-folder on your web server. The core command might look something like this:

 

foldersizes.exe /path:"\\computer\share" /export:"\\webserver\share\folder" /exit

 

Now that we've defined an example, setting it up within Scheduled Tasks is straight-forward. Navigate to the Scheduled Tasks folder (found within Start | Accessories | System Tools on Windows XP) and select File | New | Scheduled Task. You'll be presented with a window that allows you to fully define the scheduled task.

 

Most of the settings within a Scheduled Task are fairly self-explanatory and are well covered by existing Windows documentation (you can also press F1 on a specific field if you need help). Perhaps the most important thing to keep in mind is that you must enter a fully qualified, quoted path to your FolderSizes executable into the Run field. Here's an example entry:

 

"C:\Program Files\FolderSizes\FolderSizes.exe" /path:"\\computer\share" /export:"\\webserver\share\folder" /exit

 

Use the remaining tabs within the Scheduled Task window to configure the tasks's schedule, along with any other settings you require. Once complete, click OK and you'll be prompted for a the username and password of an executing user (see Tip 2 below). Assuming you enter valid user credentials, the task will now be scheduled.

 

Helpful Tips

 

Important: It is highly recommended that you use the /exit command line parameter with scheduled jobs like this one, to ensure that the FolderSizes.exe process terminates once the job is complete.

 

Tip 1: Always test your command line job thoroughly before scheduling it to ensure that no error messages appear on-screen. If such errors occur during Scheduled Task execution, they could cause the task to (effectively) hang.

 

Tip 2: When creating a Windows Scheduled Task, you must enter the name and password of the executing user. Be sure to enter the credentials of a user that has permission to access the file system path(s) being scanned.

 

Tip 3: When publishing exports to a shared folder on a scheduled basis, you may want to use the /date command line parameter to append the current date to exported filenames. This will help to ensure that export files aren't over-written each time the job executes.

 

Tip 4: Within the Windows Scheduled Tasks listing window, you can right-click on a task and select "Run" to execute it immediately. Doing so can be a handy way to ensure that a task operates as expected prior to relying on it for production use.