Moving folders and files without changing metadata

So i’m building a robot to help deal with GDPR stuff.
I’m Basically moving and deleating files and folders based on dates and such.
The problem i’m having is that the files and folders activities in UiPath change the modified dates on folders and files when moving them.

Is there some way to use these activities without changing the meta data or do i have to use some other method?

Before automating this I have been using Total commander where there is an option to copy date and time information on the files and folders.

Hi @msr,

Welcome! I don’t believe there is such an option with the file UiPath Activities as those activities are based on the Windows normal file ops. However, if you are using another application to move your files (Total Commander), you can automate that application with UiPath Studio, at least that’s what I can think of.

Juan P.

Sadly that is not an option as i would have to run UiPath in an elevated state, causing problems with the license asigned to my AD user.

I did however find a solution over the weekend.
Using the invoke code activity i have been able to read the meta data before i move the files and folders and then after they have been moved write that data back onto the files and folders.

The system.io namespace has everything you need

System.IO Namespace | Microsoft Learn

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.