--Using Detach and Attach option
--step1: Creating sample database or use existing one
create database Test1
go
--step2: Checking current path and note into notepad
sp_helpdb Test1
--step3: create a folder (Ex: d:\Test1Files)
--step4: Detach the database
alter database Test1 set single_user with rollback immediate
go
--step5: Detach the database
sp_detach_db Test1
--step6: Go to old path and move the files into new location
--Attach from new location
USE [master]
GO
CREATE DATABASE [Test1] ON
( FILENAME = N'D:\Test1Files\Test1.mdf' ),
( FILENAME = N'D:\Test1Files\Test1_log.ldf' )
 FOR ATTACH
GO
--step7: Check the new path
sp_helpdb Test1