MQLArticles/Utils/File
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2026-09-06 11:15:27 -05:00
..
FolderOps correciones y mejoras 2026-09-02 15:54:33 -05:00
File.mqh new files added 2026-09-01 20:00:53 -05:00
Path.mqh new files added 2026-09-01 20:00:53 -05:00
README.md new files added 2026-09-06 11:15:27 -05:00

← Utils

Utils/File

File and path handling utilities: extensions, directory parsing, and folder creation relative to the MQL5\Files sandbox.

Main features

  • Extract/validate file extensions and pure file names (FileGetExtension, FileHasExtension, GetPureFileName, FileRemoveExtension, in File.mqh).
  • Get the directory portion of a path (PathGetDirectory).
  • Create a folder relative to the terminal's data or common MQL5\Files path (CreateFolder in Path.mqh).
  • Folder-level operations — cleaning and encrypting a folder's contents (CFolderOpsClean, CFolderOpsEncrypt, built on CFolderOpsBase in FolderOps/).

Basic usage

string ext = FileGetExtension("report_final.csv"); // "csv"
string name = GetPureFileName("C:\\path\\report_final.csv"); // "report_final.csv"

CreateFolder("MyBotLogs", false); // creates MQL5\Files\MyBotLogs

Only the most representative functions are shown here.