Hi, I am using a config file as the date might change, so i need a dynamic script. i want to check if a zip file exist. How do i do it? Thanks!
Can you be more clear…like what you want to check and if there is any pattern for date?
Hi @Joanna2. Please let us know if this helps.
- Use assign activity and create a variable of array of string(Eg. strArray_ZipFiles).
- Add this
Directory.getFiles("<Folder path where the zip folder exists>","*.zip")in the “value to save” of assign activity.
- Use a foreach activity to loop and mention “strArray_ZipFiles” in the “List of items” field
You will receive an array of zip files available in the folder
Note: In the config file just mention the folder path and remove the date which is mentioned.
I need to indicate the date though as it’s a monthly report… How do i do with a date
Check this one
Hi @Joanna2! I’d say you assign that path to a variable and then use the If activity to check if exists.
If it exists you move on to the next activity, if not in the Else condition you can use the activity “Create File” to create it if that’s what you want.
Let me know if this helps, Cheers!