SQL_Hunt
SSC-Dedicated
Points: 33518
More actions
September 20, 2016 at 12:21 pm
#313806
Hi Experts
Please provide an useful script to gather the available space in the network drive.
Thanks
Thanks.
Sergiy
SSC Guru
Points: 110209
September 20, 2016 at 6:20 pm
#1902059
CREATE TABLE #Output (
RowNo INT IDENTITY(1,1) PRIMARY KEY,
output NVARCHAR(4000)
)
INSERT #Output ( output )
EXEC MASTER..xp_cmdshell 'dir \\ServerName\SharedFolder'
SELECT *
FROM #Output o
WHERE Output LIKE '%bytes free%'
_____________Code for TallyGenerator
Viewing 2 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply