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

  • This will work for naming the file.  Now all I need to do is figure out how to move and rename the file.

    DECLARE

    @TodayDate as varchar(40),

    @TodayHour as varchar(40),

    @TodayMinu  as varchar(40)

    SELECT @TodayDate = CONVERT(varchar(10), GETDATE(), 112)

    SELECT @TodayHour = DATEPART(hh,GETDATE())

    SELECT @TodayMinu = DATEPART(mi,GETDATE())

    SELECT 'ImportData' + '_' + @TodayDate + '_' + @TodayHour + '_' + @TodayMinu + '.txt'