Is it possible to create a "fileset of directories" ?
Is it possible to create a "fileset of directories" ?
here is what I'm intending to do:
I have a FTP Server where users log in with real accounts, and where they can upload files in a directory structure like this: /FTP_HOME/User1/InBOX, /FTP_HOME/User2/InBOX, ...
I would like to create a project whitin GA Anywhere that:
- creates a "dirset" of directories under /FTP_HOME
- foreach OneDir in "dirset"; do
- Run tasks onfiles located in ${OneDir}/InBOX
Is this feasable ?
Thanks in advance
- marcosjl
- Posts: 5
- Joined: Thu Oct 07, 2010 9:54 am
Re: Is it possible to create a "fileset of directories" ?
For Instance, using the example you provided - /FTP_HOME/User1/InBOX, /FTP_HOME/User2/InBOX,... - you would create a fileset using /FTP_HOME as the base directory and specify Recursive - True. Next use the Print task to write the resulting fileset out to a file. Use the Search and Replace task to replace all of the slashes (/) with a valid .csv delimiter (I usually use a pipe (|) ) giving you records that look like:
|FTP_HOME|User1|InBOX|filename
|FTP_HOME|User2|InBOX|filename
Then use a Read CSV task to read the file. In this case, each of the folders you want to work with is the third field, so you can use a loop to process the files for each user.
Files in either /FTP_HOME or in /FTP_HOME/User1, /FTP_HOME/User2 (etc) could cause this process to not work as expected, so if that is a possibility, you'll need to take steps to handle them.
- Support_Duane
- Support Specialist
- Posts: 66
- Joined: Thu Mar 05, 2009 2:49 pm
Who is online
Users browsing this forum: No registered users and 1 guest