file exists

All questions related to installations, configurations and maintenance of Advanced Host Monitor (including additional tools such as RMA for Windows, RMA Manager, Web Servie, RCC).
Post Reply
chri
Posts: 19
Joined: Mon Mar 09, 2009 6:47 am

file exists

Post by chri »

hi,

i should check for new files in a folder and i don´t know how i should set the variable.
the names of the files are like this one "#content#{1CD85198-26C6-4bac-8C72-5D34B025DE35}#120321032#Full!zip" and without any extension.
they all beginn with "#content#" but %content% does not work.....


thank you
christian
KS-Soft Europe
Posts: 2832
Joined: Tue May 16, 2006 4:41 am
Contact:

Post by KS-Soft Europe »

What test method do you use to check files ?
Maybe you need %NewestFile% macro variable. It contains name of the newest file in specified folder.
This variable can be used with the following test methods like "Folder/File Size", "File/Folder Availability", "Compare Files".
Please note: when using variables in file path, "Translate macros" option should be enabled.

Please check the manual or visit our web site for more information at:
http://www.ks-soft.net/hostmon.eng/mfra ... especmacro
KS-Soft
Posts: 13012
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

There are several options depending on what exactly do you need:
- you may use Count Files test method and filemask #content#*.*
- you may use File/Folder Availability and %NewestFile% variable

What exactly means "check for new files in a folder"?
You need to find single newest file? count number of new files? Do you need to retrieve file name for some report or action? or you need number of the files?

Regards
Alex
chri
Posts: 19
Joined: Mon Mar 09, 2009 6:47 am

Post by chri »

Hi,

I want to check if there is such a file, not older than 24 hours.


christian
KS-Soft
Posts: 13012
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

Then you may use any of these methods

Regards
Alex
chri
Posts: 19
Joined: Mon Mar 09, 2009 6:47 am

Post by chri »

ok, but there are other new files in this folder, and so the test should only check for new files in this folder whitch beginns with the string #content# and ignore all the other files....
KS-Soft
Posts: 13012
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

There are files with different name pattern that should not be counted?
Then use Count Files test method

Regards
Alex
Post Reply