Welcome, Guest. Please login or register.

Login with username, password and session length

 
Advanced search

704 Posts in 214 Topics- by 630 Members - Latest Member: BYODre

May 18, 2012, 08:33:00 PM
RES Software User Group ForumProductsAutomation Managerwant to check if a file exists in an condition for a task.. this is how to do it
Pages: [1]
Print
Author Topic: want to check if a file exists in an condition for a task.. this is how to do it  (Read 1018 times)
pkaak
Newbie
*
Posts: 35


Systems Engineer - Centric IT Solutions


« on: February 14, 2010, 11:15:00 PM »

There are many times I make tasks in Wisdom to copy files.
Most of the times I copied the file always, but that takes time.

So I searched for a way to check if the file exist before copying it.
And there is, and it seems it is language independent (checked it on an Windows XP dutch and english installation).

So how to do it:
* on the task use the check file version

- the version is 'file not found' when the file isn't there.
- the version is 'na' when it is a file that has no version (txt, vbs, etc. all that is not .exe, .com, .sys or .dll)
- it returns a version number when there is a version on the file.

So if you want tot copy a vbs only when it doesn't exists (such as in terminal server maintenance tasks), you can set an condition the search for the version number of the vbs. Just look if the version is in form of 'version = 'file not found' ' and do the copy/download task if this condition is met.
Logged
RESguru
RESUG Forum Moderator
Jr. Member
***
Posts: 69



WWW
« Reply #1 on: March 30, 2010, 04:59:02 PM »

Thanks for the tip!
I've put in a feature request for a simple if-exist check, which should also work on folders as well as any kind of file.
Logged

Thanks,
Max Ranzau | Twitter: http://twitter.com/RESguru
Pages: [1]
Print
Jump to: