/ Published in: SQL
This will run a bat file to get free space on a drive and write the results to a table.
Use script at http://snipplr.com/view/8331/calculate-free-space-on-drive/ as FreeSpace.bat
Expand |
Embed | Plain Text
IF EXISTS (SELECT * FROM INFORMATION_SCHEMA.TABLES WHERE table_name = 'FreeSpace') DROP TABLE FreeSpace CREATE TABLE FreeSpace ( SpaceInMB varchar(100) NULL ) INSERT INTO FreeSpace EXEC master..xp_CMDShell 'C:\Scripts\FreeSpace.bat'
You need to login to post a comment.
