James Reece
June 14, 2016 09:38 ANSWERED
I want a simple workflow to open a pre-defined folder location and to iterate through all pdf files within that have a similar filename (the date changes), e.g. “Weekly Macro Report_yyyy_MMM_dd”, and perform some screen scraping.
How can I express "Weekly Macro Report * " as a variable to the Read PDF activity. A wildcard, basically.
I cannot find documentation that details the parameters/variables of the activities.
My directory to an existing path on my server and within the For Each body, simply put Message Box with input.text set as item.ToString.
Sadly, when it runs it tells me the directory does not exist. I used a full unc path and it appears to have resolved it correctly - the error message has, at least.
Andrzej.Kniola June 15, 2016 12:04
Calling GetFiles on a System.IO.DirectoryInfo will return FileInfo, but static Directory.GetFiles only returns String with full paths as the elements.
Here on SO there is a good short explanation on how to use both.
For this use case, at least as far as I understand your description, filepaths should be sufficient.
Can someone please explain, what is Directory in Directory.GetFiles()? For me this function is not working, when I assign Directory a string value of my path or give it a String array to store in the files on the directory, I keep getting errors that ‘GetFiles’ is not a member of String and String.Array. So what is it a member of?
I’ve tried: Directory.GetFiles(DayFolder.ToString,“.TAB,.TXT”) but it isn’t working. I want to find files that end in either .txt or .tab and screen scrape! thanks!!!
Hi all, I am working on opening pdf’s and scraping data. for the for each activity, I am getting the following error: For each: Unable to cast object of type ‘System.Char’ to type ‘System.String’.