Hi Kati. Try this:-- Declare variable to store new pathDECLARE @NewPath VARCHAR(32)-- Create table variable to store test dataDECLARE @tmp TABLE (FilePath VARCHAR(255))-- Populate table variable with test dataINSERT INTO @tmp VALUES('C:\one\two\three\file_one.txt')INSERT INTO @tmp VALUES('D:\four\five\file_two.csv')INSERT INTO @tmp VALUES('E:\five\file_three.dat')-- Set new pathSET @NewPath = 'C:\Temp'-- Select desired resultsetSELECT STUFF(t.FilePath, 1, LEN(t.FilePath)-CHARINDEX('\', REVERSE(t.FilePath)), @NewPath) FROM @tmp AS tMark