File - lainz/lainzcodestudio GitHub Wiki

#File.DoesExist Returns true if a file exists at specific location or false if it does not.

result_boolean = File.DoesExist("C:\\temp\\test.txt")

#File.GetShortName Gets the "8.3" version of the full path to an existing file.

result_string = File.GetShortName("C:\\temp\\test.txt")

#File.OpenEmail Opens the default email client with an email adress in the "To" field.

File.OpenEmail("[email protected]")

#File.OpenURL Opens a web URL in the default browser.

File.OpenURL("https://github.com/")

#File.Print Prints a document on the default printer. This is the same as selecting "print" from the right click context menu of the file you wish to print.

File.Print("C:\\temp\\test.txt")

#File.Run Runs an executable.

Parameters: Filename, Arguments, WorkingFolder, WindowMode, WaitForReturn

result_number = File.Run("C:\\Windows\\notepad.exe", "", "", 1, false)

WindowMode can be:

  • 1: Normal
  • 3: Maximized
  • 6: Minimized
  • 0: Hide