| DiskUtilitiesTryExecuteBatFile Method |
Attempt to run a batch file.
Namespace:
DustProductions.Core
Assembly:
DustProductions.Core (in DustProductions.Core.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax public static bool TryExecuteBatFile(
string batchFileDirectory,
string batchFileName,
bool ensureEndings = true,
string[] arguments = null
)
Parameters
- batchFileDirectory
- Type: SystemString
The directory the batch file lives in - batchFileName
- 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:
BooleanFalse if the batch file exited with code other than 0 or throws an exception
See Also