Download Reference Manual
The Developer's Library for D
About Wiki Forums Source Search Contact

        Rename a file, which can move it from one directory to another


private import,

void main(char[][] args)
        if (args.length is 3)
           // address the source path
           auto src = new FilePath (args[1]);

           // rename file
           src.rename (args[2]);
           Cout ("usage: rename existingFile newName").newline;