-- ####################################################################
-- Script for rename number of files at once.
-- For beg file count (>1000) use rename_storage.sql
-- ####################################################################

declare @old_path varchar(250)
declare @new_path varchar(250)

-- Change '\\server\old_path' with real path, that should be replaced
-- Do not type ending \
set @old_path='\\SAM-DCSRV-01'

-- Change '\\server\new_path' with real path, that should be used instead old path
set @new_path='\\SAM-RMA-01'

update ph set filename= REPLACE ( filename , @old_path , @new_path ) 
where filename like @old_path+'\%'
