0 votes
1 view
in RPA by (12.8k points)

I want to go over a directory and delete all files older than x, in Uipath. My problem is that I don't know how to go over another folder that may be inside.

Here is what I have.

And here

1 Answer

0 votes
by (29.8k points)
To go over each file in a folder and the potential subfolders you can do the following:

Directory.EnumerateFiles(root, "*.*", SearchOption.AllDirectories).
Then to get information about the file you can use File.GetAttributes(file) and return a FileAttributes object which will give detailed information about the file's creation date etc.

Related questions

0 votes
1 answer
asked Jul 19, 2019 in RPA by noah kapoor (5.3k points)
0 votes
1 answer
asked Jul 22, 2019 in RPA by noah kapoor (5.3k points)
0 votes
1 answer
0 votes
1 answer
asked Nov 20 in RPA by dev_sk2311 (21.6k points)
Welcome to Intellipaat Community. Get your technical queries answered by top developers !


Categories

...