i have to move file from one folder to another by using move file and need to add current time
but i should include file name also like test1 19-11-2021like this but the file name will be changing always.
You can use For each file in folder Activity and use move file
- You can use Current file for dynamic file name
Are you able to move the file?
if yes. you can use string concatenation to set the name to the file dynamically. just pass the data inside the variable
Be carefull with string concatenation of folders + files, you’ll have to consider dirty input with the
\ in between file and folder:
assign myFullPath = "c:\temp\" + "myFile" will be correct
assign myFullPath = "c:\temp" + "myFile" will not be correct, your missing the
A proper solution for this is:
assign myFullPath = path.combine(folderName, Filename).toString will always work. The path.combine is ‘intelligent’ enough to determine if a
\ needs to be added or not.
I think you need to move file and Rename
Use For each to iterate the list of files from directory
Use assign Path.GetFilenameWithoutExtension(item)+" "+Now.Tostring(“dd-MM-yyyy”)+“YourFilenameExtesion”
use move file activity
Refer the screen shot below!
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.