I’m trying to write a simple job that will copy log files from the robot’s machine to a shared drive. I was going to do this with a “For Each” loop for directory.getfiles(“%localappdata%\UiPath\Logs”) but that does not seem to work - it seems to look for the directory I’m working in, plus “%localappdata%\UiPath\Logs”
Is there another way to use %localappdata% in this way? I can’t hard code the path as it will vary depending on the username of the robot
you can use a move file activity that would move the file or even the folder to the destination you set,
pass the source folder path completely- mean the full path of logs folder in your system and you can find this by pressing the open logs option from execute menu in your studio
go there and get the file path and set the destination path as well
One activity can do this buddy
for more info on this activity https://activities.uipath.com/docs/move-file
Cheers