-filemask (-fm)
Previous Topic  Next Topic 

Category:

 

Attachments

 

Description: 

 

Specifies a file mask, e.g. *.*, SYS*.TXT, OS*.TXT.  Separate multiple filemasks with a comma.

 

Optional?

 

Yes.

 

Overrides:

 

None.

 

Overridden By:

 

None.

 

Other Parameters Required:

 

-to -from -server (-attachmentdir or -watchdir)

 

See Also:

 

None.

 

Usage:

 

-filemask "<filemask>"

 

By default, the mask is *.* - all files. -filemask works with the following DOS wildcards:

 

"*" matches one or more of any characters

"?" matches one or zero of any character

 

Thus, "*.txt" finds any file whose extension is ".txt"; "Rep*.txt" finds all .txt files whose names start with "Rep"; "Rep?.*" finds all files of any extension that have "Rep" as the first three letters of their names plus perhaps one other character, e.g. "Rep6.doc".

 

Example (cut-and-paste right into your batch file):

 

NetMailBot -filemask "*.txt" -attachmentdir "c:\Documents and settings\docs" -to email@domain.com -from email@domain.com -server mail.domain.com -subject "test" 

 

(The following will look for any file ending with .txt, .doc, and .xls)

NetMailBot -filemask "*.txt,*.doc,*.xls" -attachmentdir "c:\Documents and settings\docs" -to email@domain.com -from email@domain.com -server mail.domain.com -subject "test"

 

Comments:

 

The filemasks * and ? only work with the -filemask parameter.