Video Screencast Help

File System monitoring

Created: 06 Mar 2013 | 2 comments

Can we monitor file system(file count in a folder/looking for content in file/file modified date/etc) using Altiris monitoring 7.1 SP2?

Operating Systems:

Comments 2 CommentsJump to latest comment

RobertBaggitt's picture

You can create a new policy and a new metric using command. You will use the ForFiles command.

Example: To delete files older than (for example) two days:

Forfiles /P C:\Downloads\ /S /M *.jpg /D -2 /C "cmd /C del /Q @path"

RobertBaggitt's picture

 Here are a couple more examples.

Using forfiles command we can get modified date and time for all the files in a directory.

forfiles /C "cmd /c echo @file @fdate @ftime"

We can restrict the command only to certain files using * command. For example, to get modified time/date only for pdf files, we can use the below command.

forfiles /M *.pdf /C "cmd /c echo @file @fdate @ftime"