I need to rename all the files available inside root folder with only number.
logic
All the three folders to be rename as
345708,353220 etc text in the folder needs to be removed
But getting this renamed to System.String
I need to rename all the files available inside root folder with only number.
logic
@Shiva_Nikhil & @Anil_G - How can I add multiple Delimiter in same string manuplation
getting error at rename folder activity
i think the error is because for every iteration you are providing the same Folder name
newname(0)
can you tell what was your requirement ?
Inside main folder I have multiple folder as mentioned below
Delimiter in the folder can be ‘-’ or ‘_’
Str_name.Split({"-","_"},StringSplitOptions.none)
try this once
Str_name.Split({"-","_"},StringSplitOptions.none)(0)
Change NewName to String, not Array of String. In the Assign where you set NewName, Split returns an array so put (0) on the end of the Split expression to get the first element in the array.
As per log the folder you are getting is 123… and as _ is not present …it is using same string which is not possible
Cheers
Renaming to the same name it already has generates a specific error:
Which is not the error they’re getting. The error they’re getting is because they’re trying to pass an array variable with .ToString as the New name.
If you want to rename with the numbers then try below way
Str_name.Split("-").First
Above result will be numbers
If you want to rename after the - then try below way
Str_name.Split("-").Last
This will return letters.
Hope it helps
Newname(0) is being passed which is a string and not array
If you observe flow and log messages then newname log and old name log are same values
Cheers
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.