Home
»
Discussion Forums
»
Scripts & Agent Procedures
»
"Drive with the most free disk space" variable
Subscribe via RSS
Share this
Similar Posts
Disk Space Free Variable
by
LegacyPoster
on
Jan 27, 2010
Logical Disk - % Free Space "Not Responding"
by
LegacyPoster
on
Apr 8, 2008
Inconsistent "all drives" disk space counter
by
myArch-man
on
Oct 9, 2014
Verified Answer
Ignore free space on certain drives...?
by
scottay
on
Sep 6, 2013
Monitor Hard Drive Free Space
by
abacusit
on
Feb 15, 2012
View More
Details
1
Reply
0
Subscribers
Posted
over 12 years ago
Scripts & Agent Procedures
"Drive with the most free disk space" variable
Posted by
LegacyPoster
on
Jun 28, 2008 7:26 AM
I'm writing a script to run an NTBackup of the system state of a server (for active directory mainly) and I want to have the shell command to use a variable so the command looks something like this:
ntbackup backup systemstate /J "System State" /F "#DiskWithMostFreeSpace#\systemstate.bkf"
I know Kaseya manages to do this somehow with Patch Management because File Source has the option of "Copy packages to temp directory on local drive with most free space." Does anyone know how to do this?
Legacy Forum Name: "Drive with the most free disk space" variable,
Legacy Posted By Username: mclark@outsourceitcorp.com
You have posted to a forum that requires a moderator to approve posts before they are publicly available.
Posted by
LegacyPoster
on
Jul 11, 2009 4:13 AM
freedrv.zip
Just saw a private message from another user looking for a solution to this. The simple answer is: vbs. File is attached.
We just pull the content of the output file (which is just a drive letter, like D) and use it in the script. What I typically do (as you'll see in the script) is leave the output file on the drive (c:\freedrv.txt) for my NTBackups and have the script check to see if the file exists, if so, then don't run the vbs again so that it doesn't run and see that C now has more free space than D because D now has a BKF on it. The only downside is if I have to point my NTBackups to another location then I have to open the .txt and edit the drive letter, or delete it and run the script again. It hasn't really been an issue though.
Legacy Forum Name: Scripts Forum,
Legacy Posted By Username: mclark@outsourceitcorp.com
You have posted to a forum that requires a moderator to approve posts before they are publicly available.