Post any question you may have in regards to GoAnywhere Director and let our talented support staff and other users assist you.
- Posts: 41
- Joined: Wed Mar 30, 2011 10:19 am
I am creating a project that needs to retrieve a single file with a name pattern similar to "file_date_time.txt". I then put the file to a specified network directory on our network, and then go back to the remote system to delete the file. When the file is put to our network, I need to change the name to "file.txt". However, the rename function does not work for filesets.
I know I can do a GET with a fileset and wildcard function to retrieve the file, but is there a way to use the (local) fileset name back on the remote system for the delete? Or a way to populate a variable with the file name and use the variable in the remote delete?
- Posts: 592
- Joined: Tue Jul 17, 2012 2:12 pm
- Location: Phoenix, AZ
There are several things here that can help you with your current situation.
First, you can add a Prefix/Suffix to your FileSet on a GET as in:
This attaches the value (like a Date/TimeStamp) to the Beginning or End of each file being retrieved. Also, utilizing the Variables during the Get:
This allows you to directly address the files on the Destination (Local Server) or the Source (Remote Server). Thus, allowing you to specifically go back and delete only the files you downloaded from the Remote Server with just a single Remote File List Variable associated to the "Processed Source Files Variable".
The "Destination Files Variable" is a Local File List Variable that will allow you to perform actions on that list as well, once the files have been retrieved to your local system.
One other thing that might help ... GoAnywhere Director has a function on the Advanced (s)FTP(s) tabs that allow you to utilize Persistent Connections.
This means you make the single FTP connection to GET the files from the Source Server. By using this Persistent Variable ID later in your project to delete the files on the Source Server, you don't have to make another connection, the connection remains open from the original GET of the files.
Hope this helps!
Lead Solutions Consultant
Return to “Community Forum”