Sorting Files based on Name & Creating new folders

@supermanPunch no worries,

it threw back that error :


Remove the * before underscore


Thank you so much guys @Sudharsan_Ka @supermanPunch, your help is really appreciated !

I just have two concerns :
1)when am creating a folder having todays date as name:
today = Datetime.Now.ToString(“dd/MM/yyyy”)
then creating folder using “Today” it’s creating a folder with today’s date and inside the folder a folder with the current month and then inside it a folder with current year ! any idea what am I doing wrong ?

  1. when trying to assign the latest downloaded file
    dfile = Directory.GetFiles(dfilepath,“*.zip”).OrderByDescending(Function(d) New FileInfo(d).CreationTime).Tolist(0)

Am getting the following :

Remove those double quotes and change the double quotes manually there


What I don’t understand is you are creating a folder with current date which will have current month and current year within itself


What I need here is to create a folder within current system date (30/10/2022)
But am getting year within month within day.


@MHarakeh ,

Could not clearly visualize the process, Could you maybe provide Screenshots of the Implementation that does these Steps ? Creating Year and Month folders ? (I believe this was not the one we suggested above)

Initial Requirement :

It is regarding this point ( If it doesn’t follow the above format I should create a new folder with today’s date (format MMDDYYYY ) and move them there. )

I’m able to create the folder but as mentioned it’s created (dd) then inside (MM) then inside (YYYY).

In the assign activity : Today = Datetime.Now.ToString(“dd/MM/yyyy”)

@MHarakeh ,

As you have mentioned the Folder Name in this way, It is creating the Month and Year folders as well, Since / is treated as a Path not as a Literal. We cannot create a Folder normally in that name format as well.

@MHarakeh ,

The Suggested format initially is as shown above. (ddMMyyyy)

@supermanPunch I used the mentioned and it worked :slight_smile:

THANK YOU SO MUCH @supermanPunch @Sudharsan_Ka Much appreciated


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