How to check if dynamic file name for current date exists

studio

#1

How to check if dynamic file name for current date exists using uipath.i want to understand how to check for a file that has a new name each day? such as Monday file = file name 22-03-2018 Job No 1988.csv, Tuesday file = file name 23-03-2018 Job No 1988.csv, etc…”


#2

HI @NikhilNagda,

Use if Condition
Path.Exists("yourfilepath")

True->Already exists

For Example
in D derive Arivu Folder i am checking the file name is exists or not.

Path.Exists("D:\Arivu\file name"+DateTime.Now.ToString("dd-MM-yyyy")+"Job No 1988.csv")

Regards,
Arivu


#4

can you share the workflow or snapshot beacause i got error > ‘Exists’ is not a member of ‘System.IO.path’


#5

you can use Path Exists activity also


#7

Use PathExists (Folder) and use PathExists(File) activities