02-08-2024 12:33 PM
Hey all,
Pretty new to programming but have manage to get a file moving rule to work that basically moves a file from FileShareBatchHarvest to Application /Public structure for users to pickup.
However, the rule currently needs the exact name of file. I have tried using wildcard symbols like "* #" for the date with no success.
Does anyone have a recommended solution to get the variable dynamic on the date section?
Solved! Go to Solution.
02-08-2024 02:51 PM
Here's an example of replacing the date in your filename with today's date:
Dim fileToMove As String = "onestream_ifrs16_2023-06-15.txt"
fileToMove = Regex.Replace(fileToMove, "\d{4}-\d{2}-\d{2}", DateTime.Now.ToString("yyyy-MM-dd"))
02-08-2024 02:51 PM
Here's an example of replacing the date in your filename with today's date:
Dim fileToMove As String = "onestream_ifrs16_2023-06-15.txt"
fileToMove = Regex.Replace(fileToMove, "\d{4}-\d{2}-\d{2}", DateTime.Now.ToString("yyyy-MM-dd"))
02-09-2024 02:27 AM
Thanks. Could you elaborate how to declare RegEx in an extender businessrule? Above gives below error message
Thanks in advance
02-09-2024 02:38 AM
I manage to figure out, and all works based on current date. Awesome big thanks for that!
02-09-2024 09:04 AM
Apologies! I left this important detail out. And you figured it out, nice work!
Thanks for the update.