Does not create folder and does not move PNG files

Need help.

My automation is not creating a png folder and is not moving the png files into that folder.

I recorded my automation running, automation only created a file folder.

Video below:

My project here:

hi @edu141415 buddyā€¦can I share my exercise ?? please let me know

1 Like

Yes.

I tried to find the fault, but I didnā€™t find the fault. I saw the solution and I was comparing, I didnā€™t find the fault ā€¦

1 Like

how are you creating the folder? Are you using .net
System.IO.DirectoryInfo CreateDirectory (string path)

I saw the solution to the problem and started doing a similar automation, I still havenā€™t found the problem, Iā€™m looking all afternoon.

Can you point me to where my error is please?

@Skyman1 - Just FYI: @edu141415 is using studiox not studioā€¦please review the video he attachedā€¦

1 Like

Iā€™m using studioX

You are right

@edu141415 - I opened up the .xaml and have a few notes. Did you make this with StudioX? Iā€™m not as familiar with that personally.

Note #1 - You have if statements where you set the condition as ā€œ[boolean] = falseā€. This is very confusing logic. Just keep the boolean by itself and put your activities on the false side.

Note #2 - No need to check if the folder exists first, you can just use the ā€˜create folderā€™ activity and it will automatically create it if it doesnā€™t exist. If it already exists it will just move onto the next activity.

Note #3 - Variable types and default variables - You currently are setting the default values and are using some VERY specific variable types. To be honest Iā€™m not even sure what a BindingsRepository (ā€˜Savedā€™ variable) or a IWorkbookQuickHandle (ā€˜Notesā€™ variable) is. Make sure these are truly the variable types you want to use. You can allow UiPath to intelligently choose the variable type for you by using ctrl+k to save the variable in the input/output section of each activity as well.

Note #4 - You are using switch statements for unknown reasons? The default is currently being unused and you only have the ā€˜Pngā€™ path in your switch statement, so Iā€™m not sure why itā€™s being used at all.

I will show you how I would approach it, please ask if you have any questions. Iā€™ll edit this post after making the .xaml to attach it

1 Like

I am studying and the video of one of the courses is made of this formal, in the example of the course it worked. I tried to do the same to practice and have more confidence, but my automation only created a folder.

Here is the course and the video, in the video you can see that it does the same thing I tried.

I used a switch because I want to make rules for images, spreadsheets and powerpoints. When I made the png rule I was already interested in testing it, as it didnā€™t work I didnā€™t continue with the other rules ā€¦

You can do the same without doing a switch. If you want to make separate folders for each type of extension I can show you how in my example. I was about to upload the .xaml but I will make it extensible in that way for you. Give me ~2min

1 Like

@edu141415 here is the .xaml that creates the folder if it doesnt exist in the users desktop, then reads through that same folder and moves any files within into a new folder based on its extension (e.g. Png files into a new folder called Png, PDF into a pdf folder, etc)

Move Files to PNG folder.xaml (7.8 KB)

@edu141415 - I found the problemā€¦in your case switch you gave ā€œPngā€ā€¦

it should be ā€œpngā€ in all lower caseā€¦

Becasue, in the project notebook when it is saving the values in all lower cases coz thatā€™s how files have been providedā€¦

File Names(Provided by Academy has png in all lower cases)

image

I quickly tested mine by changing Png , mine too didnt workedā€¦

Hope this solves your problemā€¦ please let me knowā€¦

1 Like

AUHAUAHAUAHAHAHAH

Thank you so much my friend, I finally found out why it wasnā€™t working! When it worked my automation made me want to scream with relief and happiness auahuahauahahahah

Thanks to everyone else who tried to help me.

Iā€™m more confident and confident than before and now I understand why it didnā€™t work.

1 Like

Thank you very much, I will look.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.