Intelligent Automation & Macro Software  

Go Back   Automation Anywhere, Inc. Forums > Products Zone > Automation Anywhere
Register FAQ Search Today's Posts Mark Forums Read

Automation Anywhere Post messages and questions related to Automation Software here.


Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 09-29-2009, 08:03 AM
mlt mlt is offline
Junior Member
 
Join Date: Sep 2009
Posts: 6
Default Problem with WildCards

Hi there,

I am having some troubles with WildCards.
Here is my situation.

I have to download files from an FTP, given an specific String wich is returned by a Query.
The problem is that Files, contains that String in the middle of the name.
For example

xxxSTRINGxxx.zip
bbbStringbbb.txt

In "Get Files" , i 've tried the following:

*$Dataset Column(4)*.*

And it doesn't work.
However, if i try

xxx$Dataset Column(4)*.*
or
bbb$Dataset Column(4)*.*

it works.

Suggestions? am i doing something wrong?

Thanks in advance
Reply With Quote
  #2 (permalink)  
Old 09-29-2009, 11:04 PM
forumsupport forumsupport is offline
Senior Member
 
Join Date: Apr 2007
Posts: 1,342
Default

Hello,

This feature, wild card support at the beginning of filename, has already been forwarded to the product development team for implementing it in the upcoming version of product.

Currently what you can do is, download *.* i.e. all files in a particular FTP folder into some temporary folder on your hard drive say C:\Temp. After the files are downloaded, you can use 'Loop for each file in a folder' to loop through all the downloaded files and inside loop block use 'If Variable' command to check if current filename includes particular string. If yes then copy that file to destination folder using ‘Copy Files’ command inside If-End if block. After 'End Loop' you can delete all the files in temp folder.

The text format of commands would appear something like this,

FTP/SFTP : Connect to "www.ftpserver.com"
FTP/SFTP : Change Folder "/Folder1"
FTP/SFTP : Get File "*.*"
FTP/SFTP : Disconnect
Start Loop " Each File in C:\Temp"
If $FileName$ Includes "string" Then
Copy Files "$CurrentDirectory$\$FileName$.$Extension$" to "C:\DestinationFolder\"
End If
End Loop
Delete Files "C:\Temp\*.*"

Hope that helps.
Reply With Quote
  #3 (permalink)  
Old 03-22-2010, 09:36 AM
TylerMitton TylerMitton is offline
Senior Member
 
Join Date: Nov 2009
Posts: 102
Default

Can you please confirm that this is still an issue in AA 5.5.1?
Reply With Quote
  #4 (permalink)  
Old 03-22-2010, 09:51 AM
TylerMitton TylerMitton is offline
Senior Member
 
Join Date: Nov 2009
Posts: 102
Default

I am also experience an issue where a get containing:

DSM_*2010317*.*

acts as if it was:

DSM_*

It is getting results that do not contain 2010317 at all.
Reply With Quote
  #5 (permalink)  
Old 03-23-2010, 09:17 AM
forumsupport forumsupport is offline
Senior Member
 
Join Date: Apr 2007
Posts: 1,342
Default

Hello,

Two wild card(*) in one string could be the issue. Did you try using DSM_*.*?

Hope that helps.
Reply With Quote
  #6 (permalink)  
Old 03-23-2010, 01:55 PM
TylerMitton TylerMitton is offline
Senior Member
 
Join Date: Nov 2009
Posts: 102
Default

No I didn't try it... because it is not what I need... I need to get files that start with DSM_ and contain 20100317 somewhere in the name. What you suggested will get more than just those files... it is completely different from DSM_*2010317*.*

You say "two wild card(*) in one string could be the issue"... are you saying that you don't know how your software works... aren't you interested in finding out?

Last edited by TylerMitton; 03-23-2010 at 02:25 PM.
Reply With Quote
  #7 (permalink)  
Old 03-23-2010, 09:16 PM
forumsupport forumsupport is offline
Senior Member
 
Join Date: Apr 2007
Posts: 1,342
Default

Hello,

We could not reproduce the mentioned scenario at our end. You need to try this,
. Download DSM_* files to some temp folder on hard drive.
. Loop for each file in temp folder.
. Inside Loop block using 'If Variable' command check if $Filename$ includes 20100317 then using Copy Files command copy that particular file to destination folder (inside If-Endif block).
. Delete all files in a temp folder after End Loop.

Below is the text format,

1) FTP/SFTP : Connect to "ftp.tethyssolutions.com"
2) FTP/SFTP : Get All Remote Files in Folder "folder1" with criteria "DSM_*.*"
3) FTP/SFTP : Disconnect
4) Start Loop " Each File in D:\Temp"
5) If $FileName$ Includes "20100317" Then
6) Copy Files "$CurrentDirectory$\$FileName$.$Extension$" to "C:\DesiredFolder\"
7) End If
8) End Loop
9) Delete Files "D:\Temp\*.*"

If you can provide your FTP configuration, we can create specific sample for your convenience.

Hope that helps.
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -7. The time now is 04:10 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.0.0 ©2007, Crawlability, Inc.
Copyright © 2003-2011 Automation Anywhere, Inc. All rights reserved