Uipath is able to invoke PowerShell and has recently been practiced in the project:
Demand:
The name of the log file generated by a system, time stamp only to minute, shape like Bz20180214_1655.log
This will overwrite if multiple logs are generated within 1 minutes, leaving only the last one.
Processing:
Fill the name of the log file with the second bit
Code:
1Gci"c:\uipath\sh\data\*_????. Log"| %{2Move-item$_. FullName ($_. directoryname+"\"+($_. Name-replace "\.log$","") + $ (get-date-format"SS")+". Log")3}
View Code
Turn into a string:
"GCI" "C:\uipath\sh\data\*_????. Log "" | %{move-item $_. FullName ($_. Directoryname+ "\" "+ ($_. Name-replace "" \.log$ "", "" "" ") + $ (get-date-format" "ss" ") +" ". Log" ")}"
Made into a robot:
ISScript to choose, because it's a script.
If you have output, you should pay attention to set typeargument, you can try it yourself
If the project is applied, the robot can be parameterized
To perform the results in Uipath Studio:
Above.
Invoke PowerShell by Uipath