SoftTree Technologies SoftTree Technologies
Technical Support Forums
RegisterSearchFAQMemberlistUsergroupsLog in
FileSearchAttrEx

 
Reply to topic    SoftTree Technologies Forum Index » 24x7 Scheduler, Event Server, Automation Suite View previous topic
View next topic
FileSearchAttrEx
Author Message
Alan



Joined: 07 Feb 2004
Posts: 3

Post FileSearchAttrEx Reply with quote

Hello,

I am trying to test the FileSearchAttrEx statement, but am encountering an error.

I am running the simple script:

Dim return_value, number

FileSetAttrEx ("c:\\log.txt", 0, return_value)

I get an error message on line 3 that state "File Search Operation Failed".

Can I only use this with wildcards?

The file I am testing for may or may not exist. I was hoping to avoid doing the additional step of checking for the existence of the file first.

Thanks,

Alan

Fri Feb 06, 2004 1:42 pm View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7969

Post Re: FileSearchAttrEx Reply with quote

FileSetAttrEx has only 2 parameters. Try

FileSetAttrEx ("c:\\log.txt", 0)

: Hello,

: I am trying to test the FileSearchAttrEx statement, but am encountering an
: error.

: I am running the simple script: Dim return_value, number

: FileSetAttrEx ("c:\\log.txt", 0, return_value)

: I get an error message on line 3 that state "File Search Operation
: Failed".

: Can I only use this with wildcards?

: The file I am testing for may or may not exist. I was hoping to avoid doing
: the additional step of checking for the existence of the file first.

: Thanks,

: Alan

Sat Feb 07, 2004 1:00 pm View user's profile Send private message
Alan



Joined: 07 Feb 2004
Posts: 3

Post Re: FileSearchAttrEx Reply with quote

Hello,

According to the 24x7manual.pdf, there are 3 parameters. When I attempt to validate it with 2 parameters only, I get the error "Bad number of arguments".

file - A string variable that is the file mask you want to use for searching files whose attributes will be updated. You can use standard * and ? wildcard characters for the mask.

attr - A numeric variable that is the new file attributes

count - A numeric variable that receives the returned value

Let me know what to try next.

Thanks,

Alan

: FileSetAttrEx has only 2 parameters. Try

: FileSetAttrEx ("c:\\log.txt", 0)

Mon Feb 09, 2004 12:06 pm View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7969

Post Re: FileSearchAttrEx Reply with quote

You are correct, it has 3 parameters. I checked some old document where it says it has only paremeters.

If you need to update just one file with a know file name
FileSetAttr instead of FileSetAttrEx

If you need to update multiple files use something like the following

Dim( done, boolean)
Dim( file_list, string )
Dim( file_name, string )

DirEx( "c:\\path\\filemask*.*", file_list )
IsEqual( file_list, "", done )
LoopUntil( done, END_LOOP )

GetToken( ",", file_list, file_name )

FileSetAttr( file_name, 0 )

IsEqual( file_list, "", done )
END_LOOP:

: Hello,

: According to the 24x7manual.pdf, there are 3 parameters. When I attempt to
: validate it with 2 parameters only, I get the error "Bad number of
: arguments".

: file - A string variable that is the file mask you want to use for searching
: files whose attributes will be updated. You can use standard * and ?
: wildcard characters for the mask.

: attr - A numeric variable that is the new file attributes

: count - A numeric variable that receives the returned value

: Let me know what to try next.

: Thanks,

: Alan

Mon Feb 09, 2004 2:05 pm View user's profile Send private message
Alan



Joined: 07 Feb 2004
Posts: 3

Post Re: FileSearchAttrEx Reply with quote

Thank you for the response.

Is there a way to use the FileSetAttrEx to accomplish a similar task? If so, please let me know what the appropriate syntax would be.

Thanks again,

Alan

: You are correct, it has 3 parameters. I checked some old document where it
: says it has only paremeters.

: If you need to update just one file with a know file name
: FileSetAttr instead of FileSetAttrEx

: If you need to update multiple files use something like the following

: Dim( done, boolean)
: Dim( file_list, string )
: Dim( file_name, string )

: DirEx( "c:\\path\\filemask*.*", file_list )
: IsEqual( file_list, "", done )
: LoopUntil( done, END_LOOP )

: GetToken( ",", file_list, file_name )

: FileSetAttr( file_name, 0 )

: IsEqual( file_list, "", done )
: END_LOOP:

Mon Feb 09, 2004 6:24 pm View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7969

Post Re: FileSearchAttrEx Reply with quote

I think there is a bug in FileSetAttrEx. Please use the workarounds I suggested in my previous message.

: Thank you for the response.

: Is there a way to use the FileSetAttrEx to accomplish a similar task? If so,
: please let me know what the appropriate syntax would be.

: Thanks again,

: Alan

Tue Feb 10, 2004 1:07 pm View user's profile Send private message
Display posts from previous:    
Reply to topic    SoftTree Technologies Forum Index » 24x7 Scheduler, Event Server, Automation Suite All times are GMT - 4 Hours
Page 1 of 1

 
Jump to: 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


 

 

Powered by phpBB © 2001, 2005 phpBB Group
Design by Freestyle XL / Flowers Online.