Level 1 revamped Lesson 12 Practical 2


#1

I tried doing the walkthrough but was not generating a new consolidate file using create file activity and also when using the Read Text file activity I was getting error reading file for all files.

I downloaded the model answer and still am getting the same issues there (no consolidated file generated and read text file failing for all files.

image

Here is the xaml of the model answer
Correct errors.xaml (9.4 KB)

There are some text files which should be in the same folder as the xaml when run as the workflow is using relative paths (just the file names). But I couldn’t upload them here as txt files are not allowed.


#2

Is this what you are trying to do?

Main.xaml (7.9 KB)


#3

Hi @prankurjoshi,

Thanks for the input

I tried your solution and put my path into the directory name variable

I ran it in debug mode as I saw that it wasn’t creating the consolidate file. So I put a breakpoint in at the for each.

Can you see what is going on with the File List values for some weird reason double \ are being substituted into the path, in the model solution they were just using the file names accessing them on a relative path basis so the xaml had to be in the same folder so I didn’t have this double \ issue (that doesn’t really explain why the consolidated file wasn’t created using the create file activity though (this was also happening with my version).

If it’s working for you then maybe there is an issue on my side.


#4

No double \s are not the problem here because it is being stored in that way, it would be visible in Locals pane only otherwise the path is correct. Yes its working fine on my machine. Main issue would be the creation of Text file


#5

Thanks for the explanation regarding the double \s.

I’ve no idea why I can’t create the file I’m running this on my home computer so I have full access and I’m also writing to a folder that I’ve dumped these files into so permissioning shouldn’t be an issue.

If it’s working for you then at least ‘from a learning point of view’ I know that there isn’t a problem with the code and as long as I understand the code my understanding of the process is OK. I can work on why my system is having issues seperately

Thanks,