• Thanks John but I can't remove it.

    My agent job outputs to that dir as the first step. It has to output to that dir for various reasons related to my unusual env.

    The second step is the rename & i need to give it the full path for it to find the file.

    This means either running:

    cd w:\dir

    w:

    rename ....

    or

    rename w:\dir\a.txt w:\ ....

    I can't get either to work.

    Nor can I include the commands in a batch that is called from the SQL job (again for stupid env. reasons on my estate).