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:!Al-UjKfbvpIogYotBeApmnZUXw3I4A?e=anowgI

hi @edu141415 buddy…can I share my exercise ?? please let me know

1 Like


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)


I quickly tested mine by changing Png , mine too didnt worked…

Hope this solves your problem… please let me know…

1 Like


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.