Network Automation Software
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: FTP Long_list with no files
Topic Summary: How do you test for the possibility there are no files to download?
Created On: 09/08/2009 04:53 AM
Status: Post and Reply
Linear : Threading : Single : Branch
Search Topic Search Topic
Topic Tools Topic Tools
View similar topics View similar topics
View topic in raw text format. Print this topic.
 09/08/2009 04:53 AM
User is offline View Users Profile Print this message

Author Icon
PeteMeyer
Apprentice (20-49)

Posts: 46
Joined: 05/03/2006

I am using the FTP Advanced 'Long_List' command to get files from an FTP server and populating the results to a dataset. All the sample tasks show you should loop on the dataset to download the individual files, but if there are not files to download, the task fails with 'myDataSet' variable does not exist. If there are files, the task works as expected. So, how to you test for this condition to exit gracefully?

 Category Survey
 09/08/2009 08:03 AM
User is offline View Users Profile Print this message

Author Icon
Ronak Patel
AUTOMATE EMPLOYEE

Posts: 967
Joined: 07/20/2006

Hi PeteMeyer,

Can you please tell me your Server Connection type?

 Category Survey


-------------------------
// Ronak Patel,
// Automate Development Team
// Network Automation, Inc. - No Code, No Limits Business Process Automation
 09/08/2009 08:11 AM
User is offline View Users Profile Print this message

Author Icon
PeteMeyer
Apprentice (20-49)

Posts: 46
Joined: 05/03/2006

I'm using SFTP, port 22

 Category Survey
 09/08/2009 08:32 AM
User is offline View Users Profile Print this message

Author Icon
Leonard Amabile
HelpSystems

Posts: 5220
Joined: 05/15/2007

Hi Pete,

This will be corrected in the next maintenance release.

http://www.networkautomation.c...sueid=a20099883028144

There are 2 workarounds for this issue:

1. Connect using the standard FTP connection rather than SFTP.
2. Use compatibility mode.

 Category Survey


-------------------------

Leonard Amabile | Director, Cross Platform Support
AutoMate | InterMapper | Skybot | Divisions of HelpSystems
T: +1.213.738.1700 | F: +1.213.738.7665
 10/10/2009 03:52 PM
User is offline View Users Profile Print this message

Author Icon
PeteMeyer
Apprentice (20-49)

Posts: 46
Joined: 05/03/2006

Arrgh... this bug also exists when trying to connect to a FTP server using Explicit SSL, passive mode.

 Category Survey
 10/12/2009 09:37 AM
User is offline View Users Profile Print this message

Author Icon
Leonard Amabile
HelpSystems

Posts: 5220
Joined: 05/15/2007

Hi Pete,

Are you running v7.1.1.0?

 Category Survey


-------------------------

Leonard Amabile | Director, Cross Platform Support
AutoMate | InterMapper | Skybot | Divisions of HelpSystems
T: +1.213.738.1700 | F: +1.213.738.7665
 10/12/2009 10:02 AM
User is offline View Users Profile Print this message

Author Icon
PeteMeyer
Apprentice (20-49)

Posts: 46
Joined: 05/03/2006

Yes

 Category Survey
 10/12/2009 10:46 AM
User is offline View Users Profile Print this message

Author Icon
Leonard Amabile
HelpSystems

Posts: 5220
Joined: 05/15/2007

Hi Pete,

I have forwarded this to our QA dept for verification.

 Category Survey


-------------------------

Leonard Amabile | Director, Cross Platform Support
AutoMate | InterMapper | Skybot | Divisions of HelpSystems
T: +1.213.738.1700 | F: +1.213.738.7665
 10/12/2009 02:10 PM
User is offline View Users Profile Print this message

Author Icon
Leonard Amabile
HelpSystems

Posts: 5220
Joined: 05/15/2007

Hi Pete,

We cannot reproduce the problem internally. Can you post the contents of your output tab? What is the exact error you are receiving?

 Category Survey


-------------------------

Leonard Amabile | Director, Cross Platform Support
AutoMate | InterMapper | Skybot | Divisions of HelpSystems
T: +1.213.738.1700 | F: +1.213.738.7665
 10/12/2009 02:16 PM
User is offline View Users Profile Print this message

Author Icon
PeteMeyer
Apprentice (20-49)

Posts: 46
Joined: 05/03/2006

Variable "FTPFileList" does not exist

 Category Survey
 10/12/2009 02:25 PM
User is offline View Users Profile Print this message

Author Icon
Leonard Amabile
HelpSystems

Posts: 5220
Joined: 05/15/2007

Hi Pete,

Do you mind exporting your task and sending the .aml file to support@networkautomation.com? I would like to verify the issue with our DEV team.

 Category Survey


-------------------------

Leonard Amabile | Director, Cross Platform Support
AutoMate | InterMapper | Skybot | Divisions of HelpSystems
T: +1.213.738.1700 | F: +1.213.738.7665
 10/13/2009 07:23 AM
User is offline View Users Profile Print this message

Author Icon
PeteMeyer
Apprentice (20-49)

Posts: 46
Joined: 05/03/2006

Task has been emailed to you.


 Category Survey
 10/13/2009 08:05 PM
User is offline View Users Profile Print this message

Author Icon
Leonard Amabile
HelpSystems

Posts: 5220
Joined: 05/15/2007

Hi Pete,

We received your task and it's being reviewed. We may have to schedule another GotoMeeting session in order to verify the issue. I will keep you posted.

 Category Survey


-------------------------

Leonard Amabile | Director, Cross Platform Support
AutoMate | InterMapper | Skybot | Divisions of HelpSystems
T: +1.213.738.1700 | F: +1.213.738.7665
 11/05/2009 12:14 PM
User is offline View Users Profile Print this message

Author Icon
PeteMeyer
Apprentice (20-49)

Posts: 46
Joined: 05/03/2006

Any update on this???

 Category Survey
 11/05/2009 02:56 PM
User is offline View Users Profile Print this message

Author Icon
Leonard Amabile
HelpSystems

Posts: 5220
Joined: 05/15/2007

Hi Pete,

Did you receive the email from our support team earlier today?

 Category Survey


-------------------------

Leonard Amabile | Director, Cross Platform Support
AutoMate | InterMapper | Skybot | Divisions of HelpSystems
T: +1.213.738.1700 | F: +1.213.738.7665
 02/23/2010 08:48 AM
User is offline View Users Profile Print this message

Author Icon
SureshDonga
Artisan (200-499)

Posts: 255
Joined: 12/28/2009

I was in the same situation like this, what I did was,

I used an If statement before download

If dataset.FTPFileType = 1

Loop dataset

download files

Increment countfile  ---Variable

so after finishing the loop, I used the condition If Countfile = 0

send mail "No Files to Download"



 Category Survey
 02/23/2010 10:18 AM
User is offline View Users Profile Print this message

Author Icon
Marjo Martinez
HelpSystems

Posts: 1041
Joined: 08/07/2005

Suresh,

Can you attach your code so we can better examine the issue?

 



 Category Survey


-------------------------
Thank you for choosing AutoMate.

Marjo

<a class="ftalternatingbarlinklarge" href="http://www.networkautomation.com" target="_blank">Network Automation, Inc. - No Code, No Limits Business Process Automation</A>
 10/05/2010 06:01 AM
User is offline View Users Profile Print this message

Author Icon
ClaudioRossi
Student (5-19 posts)

Posts: 6
Joined: 10/05/2010

Hello,

I'm trying Automate 7.1.3.0  and I have a problem with Tutorial

Module 4 - FTP Uploads by Files Last Modified Date

link: http://www.networkautomation.com/urc/tutorials/module-4-ftp-uploads-by-files-last-modified-date/82D9F52F-9E82-4024-86992221C22E0578/

in particular "FTP Advanced/Get long file list" function doesn't create any daset (slide 102/138).

Can you help me please?



 Category Survey
 10/05/2010 08:33 AM
User is offline View Users Profile Print this message

Author Icon
Leonard Amabile
HelpSystems

Posts: 5220
Joined: 05/15/2007

Claudio,

Are there files present in the folder you are monitoring? A dataset only gets created if files are present. Please post what you can of your task.

 Category Survey


-------------------------

Leonard Amabile | Director, Cross Platform Support
AutoMate | InterMapper | Skybot | Divisions of HelpSystems
T: +1.213.738.1700 | F: +1.213.738.7665
 10/07/2010 02:01 AM
User is offline View Users Profile Print this message

Author Icon
ClaudioRossi
Student (5-19 posts)

Posts: 6
Joined: 10/05/2010

Yes, there are files in the remote directory, but I think the problem is in the function "Get long list file". In it I selected the data label, and in the field "Create a dataset with..." I inserted the dataset name "FTPFileList". In the next step I have to use this dataset in a "IF" condition, but I DON'T FIND my dataset name in the DataSet folder. I should find it looklike in the tootorial.

What do you think about?



 Category Survey
 10/07/2010 12:45 PM
User is offline View Users Profile Print this message

Author Icon
Rick Johnson
AUTOMATE EMPLOYEE

Posts: 2757
Joined: 07/14/2008

Hi Claudio,

Which field in your FTPFileList dataset did you want to reference?

For example if the field name is FileName, then you would refer to FTPFileList.FileName to address that specific fiel with the current dataset row.

If there is still an unresolved case, can you post your task steps using the Attach Code button?

 Category Survey


-------------------------
- Rick Johnson
Network Automation
 10/07/2010 11:49 PM
User is offline View Users Profile Print this message

Author Icon
ClaudioRossi
Student (5-19 posts)

Posts: 6
Joined: 10/05/2010

Sorry Rick,

I think I haven't explain well my problem. I find nothing of my FTPFileList dataset, even the name. Below my code, with a comment before the step "IF":

<AMVARIABLE NAME="TheLocalFileDate"></AMVARIABLE>
<AMVARIABLE NAME="TheLocalFile"></AMVARIABLE>
<AMVARIABLE NAME="TheFileName"></AMVARIABLE>
<AMFTPLOGIN SERVER="cam65" USERNAME="username" PASSWORD="AM1eP275Sbdumo=aME" PORT="21" />
<AMLOOP TYPE="FOLDER" FOLDER="C:\Documents and Settings\Claudio Rossi\Desktop\prova" RESULTVARIABLE="TheLocalFile">
     <AMSET VARIABLENAME="TheFileName">%ExtractFileName(TheLocalFile)%</AMSET>
     <AMSET VARIABLENAME="TheLocalFileDate">%FileDateTime(TheLocalFile)%</AMSET>
     <AMFTPADVANCED FTPCOMMAND="long_list" FTPLONGLISTDATASET="FTPListFile" PARAMETER="%TheFileName%" />

 

     <!-- here I want to compare the local file date with "FTPFileList.FTPFileDate" but iI don't find my dataset in the folder "Datasets" because the "long_list" function doesn't create the dataset. -->

<AMIF EXPRESSION="%TheLocalFileDate% > ">

 

     </AMLOOP>
</AMIF>
<AMFTPLOGOFF />



 Category Survey


Edited: 10/07/2010 at 11:58 PM by ClaudioRossi
 10/08/2010 09:30 AM
User is offline View Users Profile Print this message

Author Icon
JeanDelfosse
Supreme Guru (1000+)

Posts: 8883
Joined: 03/30/2005

Claudio,
I would suggest that in addition to creating a dataset you also specify a variable to populate with the returned data.
If the variable is empty, that means there is nothing in the list, and then you can avoid looping the dataset, which is for sure not created.

 Category Survey
AutoMate 7 version:
Windows version:


-------------------------
Jean Delfosse - Automate Beta Tester
Win7 Pro 64 bits -Win XP Pro SP3 32 bits - AM8, AM7, BPA10, BPA9, BPA8, BPA7, AM6 Enterprise, AM4
 10/11/2010 11:06 PM
User is offline View Users Profile Print this message

Author Icon
ClaudioRossi
Student (5-19 posts)

Posts: 6
Joined: 10/05/2010

Hello Jean,

and thankyou for your answer. I have followed the steps shown in TUTORIAL n.4:

Link to tutorial lesson 4: http://www.networkautomation.com/urc/tutorials/module-4-ftp-uploads-by-files-last-modified-date/82D9F52F-9E82-4024-86992221C22E0578/

I wonder why on my pc with automate 7.1.3.0 doesn't work like in the tutorial.

In any case, could you post the code to do how you are suggesting please?

Thank you in advance!



 Category Survey
 10/12/2010 12:24 AM
User is offline View Users Profile Print this message

Author Icon
JeanDelfosse
Supreme Guru (1000+)

Posts: 8883
Joined: 03/30/2005

Claudio,
In one of my ftp sites I have manually created an "emptyfolder" folder
the task below navigates first to the parent folder then to the emptyfolder and issues a longlist with results in a var "list" and a dataset "ds2"
The second message box displays that in the emptyfolder "list" is empty and ds2.totalrows=0
Testing these values will tell you that there are no files in there.

You can experience it on one of your own ftpsites just by changing the credentials and paths

 Category Survey
AutoMate 7 version:
Windows version:



Task Steps: (Right click, Select All, Copy to copy to the clipboard. Steps can then be pasted into the AutoMate Task Builder)


-------------------------
Jean Delfosse - Automate Beta Tester
Win7 Pro 64 bits -Win XP Pro SP3 32 bits - AM8, AM7, BPA10, BPA9, BPA8, BPA7, AM6 Enterprise, AM4
 05/02/2016 11:59 AM
User is offline View Users Profile Print this message

Author Icon
WilliamDoyle
Apprentice (20-49)

Posts: 25
Joined: 03/26/2009

I am having the same issue, I am using Automate 10, the system is issuing an error in the event of a blank data set.
FTP faile (Error: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.)

 Category Survey
AutoMate 7 version:
Windows version: Windows 2008 R2


-------------------------
William Doyle
Director, IT
Southco, Inc.
210 N. Brinton Lake Rd.
Concordville, PA 19331

Edited: 05/02/2016 at 12:07 PM by WilliamDoyle
 05/02/2016 12:09 PM
User is offline View Users Profile Print this message

Author Icon
WilliamDoyle
Apprentice (20-49)

Posts: 25
Joined: 03/26/2009

The message went away....No idea, sometimes when there are no files, it is timing out while looking.

 Category Survey
AutoMate 7 version:
Windows version: Windows 2008 R2


-------------------------
William Doyle
Director, IT
Southco, Inc.
210 N. Brinton Lake Rd.
Concordville, PA 19331
 05/02/2016 02:48 PM
User is offline View Users Profile Print this message

Author Icon
Alex Escalante
HelpSystems

Posts: 656
Joined: 02/26/2014

Hello William,

Many servers set the timeout on their side. You may want to enquire to see if there is a timeout, and if so, we may adjust for it accordingly.

 Category Survey


-------------------------

Alex Escalante | Support Analyst
AutoMate | Division of HelpSystems
HelpSystems, LLC | T: +1.213.738.1700 | F: +1.213.738.7665
 05/02/2016 03:54 PM
User is offline View Users Profile Print this message

Author Icon
Devin Cannon
HelpSystems

Posts: 279
Joined: 03/17/2016

Hi William,

Is there still issues with this?  If so, could you please provide the task involved and the specific error message it's giving?



 Category Survey
AutoMate 7 version:
Windows version:


-------------------------

Devin Cannon | Support Analyst
AutoMate | Division of HelpSystems
HelpSystems, LLC | T: +1.213.738.1700 | F: +1.213.738.7665
Statistics
17531 users are registered to the AutoMate Discussion forum.
There are currently 0 users logged in.

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

Sitemap Network Automation Software Blog