Network Automation Software We are currently migrating this forum
over to our HelpSystems domain. Please
post all new threads in our new
HelpSystems Community Portal.
Post to the HelpSystems Forum
You are not currently logged on. You must be logged on in order to post. Log on
Or Create a new account
AutoMate Discussion
Decrease font size
Increase font size
Topic Title: Including wildcard characters in IF statement
Topic Summary: Method to include wildcard characters in a standard IF statement
Created On: 03/25/2011 10:22 AM
Status: Read Only
Linear : Threading : Single : Branch
 Including wildcard characters in IF statement   - BillRishsew - 03/25/2011 10:22 AM  
 Including wildcard characters in IF statement   - JeanDelfosse - 03/25/2011 11:16 AM  
 Including wildcard characters in IF statement   - JeanDelfosse - 03/25/2011 01:01 PM  
 Including wildcard characters in IF statement   - BillRishsew - 04/04/2011 08:47 AM  
 Including wildcard characters in IF statement   - JeanDelfosse - 04/04/2011 09:41 AM  
 Including wildcard characters in IF statement   - MarcVerner - 10/03/2012 01:37 PM  
Search Topic Search Topic
Topic Tools Topic Tools
View similar topics View similar topics
View topic in raw text format. Print this topic.
Answer This question was answered by BillRishsew, on Monday, April 4, 2011 8:47 AM

Answer:

OK, here is what I did:

If ((StrComp(strFilename, Left(fileList.FTPFileName, 21), 1) = 0) AND (bolSuccess <> 1))

I know what the first 21 characters of the file to download will be each day. The hhmmss would be a shot in the dark.

So, by grabbing each file in the FTP list and performing a string comparison on the first 21 characters, the file is located and downloaded.

Thanks for the direction.

 

 03/25/2011 10:22 AM
User is offline View Users Profile Print this message

Author Icon
BillRishsew
Student (5-19 posts)

Posts: 9
Joined: 03/24/2011

I've spent the hour reading through several post pertaining to using wildcards in standard IF statements.

Didn't find anything useful. May be I'm not getting the concept yet. I'm in my second full day of using this application, so a little slack is appreciated.

I have a file I need to download each day. It is in the format Filename_20110325071039.csv (yyyyddmmhhmmss). There is nothing I can do about the name. There is no way to anticipate the hhmmss, obviously, so I included ?????? in the variable that builds the filename.

No bueno.

The IF statement finds itself in a LOOP. The LOOP looks at a long file list of the FTP directory contents. I see the file go by when running in debug mode. So I know the file is there. I also see the variable displayed as Filename_20110325??????.csv.

So, basically the IF statement looks like something like this:
   If %variable1% = %fileList.fileName% then...



 Category Survey
Statistics
18258 users are registered to the AutoMate Discussion forum.
There are currently 0 users logged in.
The most users ever online was 5551 on 01/08/2018 at 11:11 AM.
There are currently 1513 guests browsing this forum, which makes a total of 1513 users using this forum.

FuseTalk Enterprise Edition v4.0 - © 1999-2020 FuseTalk Inc. All rights reserved.

Sitemap Network Automation Software Blog