Create new folders "IF!"

So have to run a report every week and the folder structure is set up (see example below)

eg:M:\Weekly Reports Open Reqs\2019\July 2019\Open Req Weekly 07.22.2019

can i automate this process so that way i can have it create all the said folders, such as, if 2019 exists, then move on to “JULY 2019” And "Open Req Weekly (whatever date)

or if i need to create a new year folder with the current year and so on down the line?

any help is greatly appreciated

@rhyan.brandt you can use path exists activity give the folder path,it gives you output as boolean.and then use if condition by giving the boolean variable,if if exists to goes to then condition and there you can use as per your requirement and if not it goes to else part there give as create directory.

Hi @rhyan.brandt

Use create directory activity.

Just pass all the folder structure you mentioned in the post to this activity… It will automatically create all the folder at a shot.

If folder is exists it will not dublicate it just it will avoid it… If not exists it will create a new one.

Ajay

how do i write this? this is where i get mixed up

right now i have +datetime.Now.ToString(“yyyy”)

but how for like JULY 2019? would it be datetime.now.tostring(“MMMM yyyy”)?

@rhyan.brandt datetime.Now.ToString(“MMMM yyyy”) yeah this gonna work right