Condition should Like the above one some how the underscore is replaced as italic formats
Regards
Sudharsan
Condition should Like the above one some how the underscore is replaced as italic formats
Regards
Sudharsan
Thanks @Sudharsan_Ka
Definitely the customer name is dynamic thus it can’t be known, but the file name will always be something like that “FName LName_Report_25072019”.
Will the mentioned condition in the image work in that case?
Yes
You need to assign the dynamic customer name in the variable CustomernameVariable
That is
CustomernameVariable= Row(“Customername”).ToString
Or
CustomenameVariable= Chandler Bing
Regards
Sudharsan
Didn’t get that: Row(“Customername”).Tostring
Can you please explain ?
Thanks for your help @Sudharsan_Ka.
Even if trying to assign custname = row(“customername”).ToString
Facing an error that ROW isn’t declared
You haven’t used for each row in datatable?
I thought you have used for each row in datatable so I said that row (“current folder”).ToString
Okay leave that
Regards
Sudharsan
No no, my files are getting downloaded into a folder and I have to sort them based on the condition mentioned above…
Thanks @Sudharsan_Ka
Apologies for the late reply.
If the Customer Name is dynamic, then we could for the below Expression :
Regex.IsMatch(Path.GetFileNameWithoutExtension(CurrentFile.FullName),"*_Report_\d{8}",RegexOptions.IgnoreCase)
Let us know if this works.
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 ?
Am getting the following :
Remove those double quotes and change the double quotes manually there
Regards
Sudharsan
What I don’t understand is you are creating a folder with current date which will have current month and current year within itself
Regards
Sudharsan
What I need here is to create a folder within current system date (30/10/2022)
But am getting year within month within day.
Regards,
Harakeh
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 :
@supermanPunch
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).
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.
@supermanPunch I used the mentioned and it worked
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.