I want to check file is exist in Downloads folder or not if exist then set status in database ’ download report ’ else ’ fail ’
Download is folder name
RlodgeName is variable store file names
Instead of starting from Downloads, It is always recommended to give full path of the folder
Let’s say it is in C:\
Then try C:\Downloads\
Hope this may help you
Use the “File Exist” activity to check the file is exist save the result in the Boolean variable. Use “IF” condition to check the Boolean is true or false. If true then update the database in the “Then” block If it is false update the database in the “Else” block.
Note : In “File Exist activity” give the full path in the “File Path” field.
I Hope it may help you!!
Change Path Type: Folder to File exists then try.
Try this approach-
First, use the “Assign” activity to create a variable
downloadPathand set its value to the path of the Downloads folder, like this:
downloadPath = Environment.GetFolderPath(Environment.SpecialFolder.UserProfile) + "\Downloads"
Use the “File.Exists” activity to check if the file exists in the Downloads folder. You can do this by passing the file path (i.e.
downloadPath + RlodgeName) to the “Path” property of the activity.
File.Exists(downloadPath + RlodgeName)
Use an “If” activity to check the result of the previous step. If the file exists, set the status in the database to “download report”. Otherwise, set it to “fail”.
If File.Exists(downloadPath + RlodgeName) Then
'Set status to “download report” in database
'Set status to “fail” in database
That’s it! This workflow will check if the file exists in the Downloads folder and set the status in the database accordingly.
The problem is that you are not puttin the entire path, also you missed an slash before the “.xlsm” part
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.