Home Forums SQL Server 7,2000 General Rename a text file, move it, using a stored procedure RE: Rename a text file, move it, using a stored procedure

  • The single command works like this:

    EXEC master..xp_cmdshell 'MOVE C:\ImportData\ImportData.txt C:\ImportData\Finished\ImportDataChanged.txt'

    When I add the + @NewFileName it does not work

    EXEC master..xp_cmdshell 'MOVE C:\ImportData\ImportData.txt C:\ImportData\Finished\'  + @NewFileName