Community
PowerMill Forum
Welcome to Autodesk’s PowerMill Forums. Share your knowledge, ask questions, and explore popular PowerMill topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Macro Rename Folder

2 REPLIES 2
SOLVED
Reply
Message 1 of 3
Felipe_Callegario
618 Views, 2 Replies

Macro Rename Folder

I would like a help with my macro, it renames only the first folder, I would rename all with my default.

 

STRING LIST $NomesInvalidos = get_folders("TOOLPATH")
FOREACH pastas IN $NomesInvalidos {
}
STRING $nome = "Setup_"
INT $count = 1

STRING $NovoNome = $nome + $count
RENAME FOLDER $NomesInvalidos[0] $NovoNome
$count = $count + 1

2 REPLIES 2
Message 2 of 3
Sean570
in reply to: Felipe_Callegario

This should fix the macro

 STRING LIST $NomesInvalidos = get_folders("TOOLPATH")
  INT $count = 1
  FOREACH pastas IN $NomesInvalidos {
    STRING $nome = "Setup_"
    STRING $NovoNome = $nome + $count
    RENAME FOLDER $pastas $NovoNome
    $count = $count + 1
  }
Message 3 of 3
Felipe_Callegario
in reply to: Sean570

Perfect, that's what I needed, thank you very much

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report