Home Event Rules

Rename a file extension

JPolimeniJPolimeni Posts: 1 Newbie

What is the best way to just rename the file extension?


  • JBrandonJBrandon Posts: 10 Resident

    This is how I've done it in the past with AWE

  • JBrandonJBrandon Posts: 10 Resident

    my aml didn't post
    Add a "<" to the font of each line and it will work in your AWE.
    -- changing an extention -->
    AMVARIABLE NAME="filenameOrig" VALUE="" />
    AMVARIABLE NAME="filenameNoExt" VALUE="" />
    AMVARIABLE NAME="newExtention" VALUE=".csv" />
    AMTEXT ACTIVITY="path" PATH="\<yoursourcepath>\filename.txt" RESULTVARIABLE="filenameOrig" />
    AMFILESYSTEM ACTIVITY="get" SOURCE="\<yoursourcepath>\changeextention.txt" RESULTDATASET="dataset" FILEPROPERTY="fullname" />
    AMTEXT ACTIVITY="trim" TEXT="%filenameOrig%" RESULTVARIABLE="filenameNoExt" REMOVE="user" CHARACTERS=".txt" />
    AMFILESYSTEM ACTIVITY="rename" SOURCE="\<yoursourcepath>\changeextention.txt" DEST="\<yourdestpath>\%filenameNoExt + newExtention%" />

  • JBrandonJBrandon Posts: 10 Resident

    you can also do a file rename thru the eft ruleset.
    setup a rule to copy or move from location a to b then use this function

Sign In or Register to comment.