Click or drag to resize

DiskUtilitiesTryExecuteBatFile Method

Attempt to run a batch file.

Namespace:  DustProductions.Core
Assembly:  DustProductions.Core (in DustProductions.Core.dll) Version: (
public static bool TryExecuteBatFile(
	string batchFileDirectory,
	string batchFileName,
	bool ensureEndings = true,
	string[] arguments = null


Type: SystemString
The directory the batch file lives in
Type: SystemString
The name of the batch file
ensureEndings (Optional)
Type: SystemBoolean
Optional parameter that makes sure the strings passed in have the proper endings (i.e. ".bat" for the batch file and "\" for the path) Defaults true.
arguments (Optional)
Type: SystemString
Any arguments you want to pass to the batch file

Return Value

Type: Boolean
False if the batch file exited with code other than 0 or throws an exception
See Also