[Index]

rename


Rename a file or directory.

This is a simple wrapper for Java's File.rename method and so is very limited.


Property Summary

from The from file.
name A name, can be any text.
to The to file.

Example Summary

Example 1 Rename a file and rename it back.

Property Detail

from

Configured ByATTRIBUTE
AccessREAD_WRITE
RequiredYes.

The from file.

name

Configured ByATTRIBUTE
AccessREAD_WRITE
RequiredNo.

A name, can be any text.

to

Configured ByATTRIBUTE
AccessREAD_WRITE
RequiredYes.

The to file.


Examples

Example 1

Rename a file and rename it back.

<oddjob>
    <job>
        <folder>
            <jobs>
                <rename id="from" name="Rename" from="${work.dir}/a.txt" to="${work.dir}/b.txt"/>
                <rename id="back" name="Rename Back" from="${work.dir}/b.txt" to="${work.dir}/a.txt"/>
            </jobs>
        </folder>
    </job>
</oddjob>


(c) R Gordon Ltd 2005 - Present