Space Availability on a network share

  • Hi Experts

    Please provide an useful script to gather the available space in the network drive.

    Thanks

    Thanks.

  • 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