Rename files with the last folder name

I need help to rename the file with the name of the last folder, each folder has only one file.

result

  • For Each File in Folder (set the Sucesso folder for “In folder” and select “Include subfolders”)
    • Rename File activity, using CurrentFile.Directory.Name and select “Keep extension”

Hi @Richarlei_Reis

Please find the image of the process to complete your requirement.

Thanks!!

There’s no reason to create and assign separate variables like that. Why would you assign currentText to Folderpath when you can just use currentText, or rename it FolderPath in the For Each activity? Anyway, For Each File in Folder will do all this much more simply.

thank you very much for the help

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.