Hi, i want to check if a zip format file exist. How do i script it in the “Path Exist” activity?
I’m using a config file as the folder’s name might change every month.
Please help. Thanks!
Hi, i want to check if a zip format file exist. How do i script it in the “Path Exist” activity?
I’m using a config file as the folder’s name might change every month.
Please help. Thanks!
Hi @Joanna2
assign directoryPath As String = “C:\Path\To\Directory”
’ Get all files with ZIP extension in the directory
assign zipFiles = Directory.GetFiles(directoryPath, “*.zip”)
Thanks!
Try this
Path.Combine(in_config("dir").ToString,Zipfilename.zip)
I hope you know the filename
Cheers
Hi, it works. but if the zip file name changes, how do i write it?
I tried the below but didn’t work.
Path.Combine(out_config(“data_dir”).ToString,“*.zip”)
Please help. Thanks!
Actually i just want to check if there’s any zip file in the folder.
try as suggested by @Nitya1
Try to get files from the folder
in if condition check zipfiles.any
Regards
HI,
Can you try the following condition?
System.IO.Directory.GetFiles(out_Config("data_dir").ToString,"*.zip").Any
Regards,
It works! Thank you!
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.