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: FTP folder delete
Topic Summary:
Created On: 10/26/2015 12:13 PM
Status: Read Only
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.
Answer This question was answered by Avtar, on Monday, November 2, 2015 2:04 PM

Answer:
Thanks. That works.
 10/26/2015 12:13 PM
User is offline View Users Profile Print this message

Author Icon
Avtar
Student (5-19 posts)

Posts: 10
Joined: 11/13/2008

Hello there,

After I download sub folders from an FTP folder, I then want to delete those sub folders. Currently, I am able to download the sub folders and their contents while maintaining the folder structure. When I delete, it only deletes the files in the sub folders. I want the entire sub folders gone.

Any help is appreciated.

Thanks,
Avtar

 Category Survey
AutoMate 7 version: 7.1.3
Windows version: Windows 2008 R2
 10/26/2015 12:29 PM
User is offline View Users Profile Print this message

Author Icon
Ricardo Castaneda
HelpSystems

Posts: 3424
Joined: 01/11/2008

Hello,

Would it be possible to post your task?

 Category Survey


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

Ricardo Castaneda | Principal Support Analyst
AutoMate | Division of HelpSystems
HelpSystems, LLC | T: +1.213.738.1700
 10/26/2015 01:12 PM
User is offline View Users Profile Print this message

Author Icon
Avtar
Student (5-19 posts)

Posts: 10
Joined: 11/13/2008

Here are the steps for ftp download and delete:


E:\PROJECT\





 Category Survey
AutoMate 7 version: 7.1.3
Windows version: Windows 2008 R2
 10/26/2015 01:14 PM
User is offline View Users Profile Print this message

Author Icon
Avtar
Student (5-19 posts)

Posts: 10
Joined: 11/13/2008

Let us try again:


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



Task Steps: (Right click, Select All, Copy to copy to the clipboard. Steps can then be pasted into the AutoMate Task Builder)
 10/26/2015 02:59 PM
User is offline View Users Profile Print this message

Author Icon
Ricardo Castaneda
HelpSystems

Posts: 3424
Joined: 01/11/2008

Hello,

The task you have created deletes files. If you would like to delete a folder you will need to use a "FTP Remove Folder".

Please make the change and let us know if that works for you.

 Category Survey


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

Ricardo Castaneda | Principal Support Analyst
AutoMate | Division of HelpSystems
HelpSystems, LLC | T: +1.213.738.1700
 10/27/2015 07:56 AM
User is offline View Users Profile Print this message

Author Icon
Avtar
Student (5-19 posts)

Posts: 10
Joined: 11/13/2008

I know that it only deletes files, that is what I mentioned in my original post.
How do I get a list of all the folder names on the FTP so that I can iterate through the list and delete them one by one.



 Category Survey
AutoMate 7 version: 7.1.3
Windows version: Windows 2008 R2
 10/27/2015 09:58 AM
User is offline View Users Profile Print this message

Author Icon
Ricardo Castaneda
HelpSystems

Posts: 3424
Joined: 01/11/2008

Hello,

Give the following code (below) a try. If the %dstest.FTPFileType% = 1 it is a file. If %dstest.FTPFileType% = 0 it is a folder. You will need to add logic but the following code will get you a name and tell you if its a file or folder.



 Category Survey



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


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

Ricardo Castaneda | Principal Support Analyst
AutoMate | Division of HelpSystems
HelpSystems, LLC | T: +1.213.738.1700
 11/02/2015 02:04 PM
User is offline View Users Profile Print this message

Author Icon
Avtar
Student (5-19 posts)

Posts: 10
Joined: 11/13/2008

Answer Answer
Thanks. That works.


 Category Survey
AutoMate 7 version: 7.1.3
Windows version: Windows 2008 R2
 11/03/2015 08:39 AM
User is offline View Users Profile Print this message

Author Icon
Ricardo Castaneda
HelpSystems

Posts: 3424
Joined: 01/11/2008

Hello,

Thank you for the update.

 Category Survey


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

Ricardo Castaneda | Principal Support Analyst
AutoMate | Division of HelpSystems
HelpSystems, LLC | T: +1.213.738.1700
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 1485 guests browsing this forum, which makes a total of 1485 users using this forum.

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

Sitemap Network Automation Software Blog