Getting an error on - Could not find a part of the path in Rename file activity
i have checked file and new name output on write line and it shows correct output but in rename file i am getting an error.
Same inputs working on another workflow.
Getting an error on - Could not find a part of the path in Rename file activity
i have checked file and new name output on write line and it shows correct output but in rename file i am getting an error.
Same inputs working on another workflow.
Hi @Luffy
I got this issue recently too. Coldn’t find a solution for it with “rename file” so I used move file(you can rename file while moving it to other folder too) which solved my problem.
Find the below thread -
Hope it helps!!
File.Exists()
method to check if the file is present before attempting to rename it.Hope it Helps!!
I have created another sample flow with same inputs which is able to rename the file but i am getting an error in my main flow.
I have already double checked the input and output value of rename file in write line which is correct.
@Luffy can you place log message before Rename activity and place this whole expression in it so that you can see it is proper path or not
try giving currentitem.fullname
in file path and in new name give name to be replaced so that the file name will be replaced with the given name.
Hope it works!!
already did ,as suggested by mahesh by replacing rename file activity with move file i am able to get the correct output.
Don’t know why rename file are getting an error.
What is the filename you’re trying to rename to? Slashes in the filename will cause this error.
Also, make sure in the New Name make sure you’re only passing the filename, not the full path.
The issue is probably in that split you’re doing. What is the original value and why are you splitting? Show the whole expression.
original value is like
ABCD-12637388_07-19-2023-13-40.xlsx
Output we want -
ABCD-12637388_07.xlsx
Is that what your two expressions are returning?
Put them in Log Message activities before the Rename File activity, to see what values you’re actually giving it.
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.