Tuesday, December 19, 2017

MSH Delete Files Older Than - From Installation to Task Scheduler - Step by Step Instruction

This will walk through you from installing to running on the schedule MSH Delete Files Older Than application.

Files for testing

Instruction will demonstrate removing files prepared for this scenario, so please create a test directory on C partition.

Put test name while creating new directory.
Next create a sample.txt file in C:\test directory.

Installation

Download the application from MSH Tools website. Next go to download directory and run Setup.MSHSoftware.DeleteFilesOlderThan.exe file.

Select I agree to the license terms and conditions option, click Install button.

Click Yes button to agree to install the application (if User Account Control window will show up).

Wait till application successfully install and click Launch button.

Licensing

If you don't have a license key yet skip this step. Application can work in demo mode but will remove only 10 first matched files and will not delete any files from Command Line.
Click Application works in DEMO mode link.

Click Enter license key button.

 Click Browse button.

 Select license.key file (you should receive it from MSH Software). Click Open button.

Application will inform that restart is required.

At next application run you will see that application is licensed to your registration name.

Create a test Rule

Select Default Startup Sample Rule and click Remove button.

Click Yes button.

To create a new rule click Add button.

On Folders tab click Add button to select folder.

Put C:\test value in Folders Path then click OK button.

Switch to Time tab and change Match files which are older than 30 from days to seconds.
Seconds are used only for our test scenario, for your files you should use better option.

Switch to Files tab and select Only specified filenames option then click Add button.

Select Wildcards option and put *.txt value in Filename Pattern then click OK button.

Switch to Action tab and select Move files to Recycle Bin.

Switch to Name tab and put Test Rule in Rule Name field, select Enable Rule option then click OK button.

Run the Rule from GUI

Select Test Rule and click Run button.

After finishing the rule in Jobs section new entry will be created.

It's a report from finished job, select finished job entry and click Show Report button.

There will be entry about sample.txt file which was Moved to Recycle Bin.

Run the Rule from Command Line

To run rules from Command Line application need to be licensed, because in demo mode none files will be removed.

Before we begin go to Recycle Bin and restore previously removed sample.txt file.

Export Rules

Before we could run application from Command Line rules need to be exported to external settings.xml file. Click Options button and then click Export Rules menu.

Go to C:\test directory and click Save button.

Click OK button.

Close the application and run the Command Line. Click Right or Left Mouse Button on the Menu Start and select Run menu. Also shortcut Win+R will work.

Put cmd value in Open field and click OK button.

To run application with previously exported rules put command and press Enter.

"c:\Program Files (x86)\MSH Delete Files Older Than\MSHSoftware.DeleteFilesOlderThan.exe" -f c:\test\settings.xml -o c:\test

-o c:\test parameter will tell the application to create CSV job report (it could be later used to check what was removed)
Application should run without any output from Command Line. Go to C:\test directory and you will see that there was created Test Rule-xxxx-xxxx.csv file.

You could edit this file ie. with Notepad to see what was done with sample.txt file.

Run the Rule from Task Scheduler

If you already invoke application from Command Line go to Recycle Bin and restore sample.txt file.
Run Task Scheduler by Windows Search or taskschd.cmd from Command Line.

Click Action menu and select Create Basic Task menu.

Put Remove sample.txt from test directory value in Name field, click Next button.

Select when to start removing files, for our example select On time option, click Next button.

Choose date and time 5 minutes forward, click Next button.

Select Start a program option and click Next button.

Put

"C:\Program Files (x86)\MSH Delete Files Older Than\MSHSoftware.DeleteFilesOlderThan.exe"

value in Program/script field or choose it by clicking Browse button. Put

-f c:\test\settings.xml -o c:\test 

value in Add arguments field. Click Next button.

Click Finish button on final screen.

Wait till task should start and go to C:\test directory to check if there are two CSV files, which means that Task Scheduler did run application rules.



Thursday, January 5, 2017

MSH Zimbra Rules

Email management system for Zimbra, it's a server side application which will help you create complex rules to centrally manage email flow and to unify the look of your corporate correspondence.

Learn more about rules for Zimbra...

Tuesday, August 23, 2016

Delete Files Older Than - Run from the command line

If you need to remove files on schedule you can run the application without the GUI interface.
The application support -f command line switch to run rules in the background, for example:

"<PATH>\MSHSoftware.DeleteFilesOlderThan.exe" -f c:\settings.xml

where settings.xml file is created from Options | Export rules menu.

If you would like to automatically generate CSV report you should use -o parameter, like below:

"<PATH>\MSHSoftware.DeleteFilesOlderThan.exe" -f c:\settings.xml -o c:\reports


Learn more how to run application on schedule.


Output from --help parameter:

MSH Delete Files Older Than 1.3.0
Copyright (C) 2017 MSH Software
Usage: MSHSoftware.DeleteFilesOlderThan.exe -f settings.xml -o c:\reports\
  -f        Settings file path.
  -o        CSV reports output directory path. Optional, should be used only
            with -f parameter.
  --help    Display this help screen.

Monday, May 16, 2016

Send auto replies only to external recipients with Exchange Server autoresponder

Auto reply will be send:
  • Only to external recipients. 
  • Only when message is sent to support@domain.com. 

NOTE1. You don't need Microsoft Outlook! Just Microsoft Exchange 2007, 2010, 2013 or 2016.
NOTE2. Replace @domain.com with your domain.


1. On the main application window, click Add button.



2. Enter name of the newly created rule. To confirm click OK button.



3. On the Auto Reply tab change Subject line.



4. Switch to the Template tab. Put the content of your auto reply.



5. Switch to the Conditions tab.



6. Click Add button and choose The recipient address includes menu.



7. On the Email address pattern line, enter support email address. Leave other options unchanged. Click OK button.



8. Switch to Exceptions tab. Click Add button and choose The sender address includes menu.



9. From the Match using option, choose Wildcards position. On the Email address line, enter your domain name with asterisk (*) at the front. Click OK button.



10. Switch to Rule Name tab. Make sure that Enable rule option is selected. Click OK button.


11. Your auto reply rule is ready.

Visit MSH Exchange Autoresponder website for more information and details.