I am new to the application and am only using Robotask Lite for right now and have it doing some minor file copying and moving and then FTP type tasks, but now I need it to do something much more complex I was hoping you could help with.
I have basically 8 different paths that are similar to this:
T:\EAH\billing\uploadh
T:\MHS\billing\uploadh
etc
I need to create a wait task and then a copy and move task of files that are arriving via an FTP job from a vendor. I need to wait for files arriving in this file each day and copy/move them. The files are a specific EDI file type called an 835. The files are saved with a string syntax of 091009MA.835, 091009MB.835, etc where the filename string is the 2 digit year, 2 digit month, 2 digit day then the letter "M" which indicates the payor type which I want only the "M" there are other files in there like 091009BA.835 but I don't care about those files. I only want the "M" ones. These files also also get assigned another letter A, B, C, D, E, and on. Usually there are A, B, C, at least but sometimes the files get up to like G or H where it is 091116MH.835, on days with many files.
I can't figure out the variable to look for these files that arrive each day with this string structure. I need to get these files from each of the 8 or so paths then Copy these files to another location and rename them with the syntax of MHS sub root folder from above in the structure exampe MHS_091117MA.835. These files arrive by about 11am in the morning each day at the latest. I am such a newbie to all of this i can't figure out how to do a file monitor then search and move the files. If someone coudl point me in the right direction this I would be so appreciative and excited.
Identifying files w uncommon name syntax
Identifying files w uncommon name syntax
In order to get files with symbol 'M' in 7-th position you may use the following mask:
??????M?.835
This mask collects all .835 files with 'M' in 7-th position
In order to process all particular folders (T:\EAH\billing\uploadh, T:\MHS\billing\uploadh, etc) I recommend you to do the following:
Make list of the necessary root folders as text, like this:
EAH
MHS
and etc.
next, you can do the following:
Text loop // on the list of root folders
// save the current line to c_root variable
File Loop // by T:\{c_root}\billing\uploadh\??????M?.835 files
// save current file name to c_file variable without full path
copy file T:\{c_root}\billing\uploadh\{c_file} to C:\destination
rename file C:\destination\{c_file} to {c_root}_{c_file}
end loop
End Loop
This is an example only. You have to adapt this algorithm to your own purposes.
Also you can attach some triggering event to this task, for example File monitor, Cyclic or Scheduler.
??????M?.835
This mask collects all .835 files with 'M' in 7-th position
In order to process all particular folders (T:\EAH\billing\uploadh, T:\MHS\billing\uploadh, etc) I recommend you to do the following:
Make list of the necessary root folders as text, like this:
EAH
MHS
and etc.
next, you can do the following:
Text loop // on the list of root folders
// save the current line to c_root variable
File Loop // by T:\{c_root}\billing\uploadh\??????M?.835 files
// save current file name to c_file variable without full path
copy file T:\{c_root}\billing\uploadh\{c_file} to C:\destination
rename file C:\destination\{c_file} to {c_root}_{c_file}
end loop
End Loop
This is an example only. You have to adapt this algorithm to your own purposes.
Also you can attach some triggering event to this task, for example File monitor, Cyclic or Scheduler.
Identifying files w uncommon name syntax
If you want to form the mask more exactly you may compose it with date variables:
{year}{monthno}{day}M?.835
Pay attention that {year} contains 4 digits. You can cut necessary substring by using "STR Extract action"
{year}{monthno}{day}M?.835
Pay attention that {year} contains 4 digits. You can cut necessary substring by using "STR Extract action"