diff --git a/System/Path.cs b/System/Path.cs
index 6e2eecee..032b0b13 100644
--- a/System/Path.cs
+++ b/System/Path.cs
@@ -176,6 +176,19 @@ namespace Vanara.IO
///
public static string GetRootFromDriveNumber(int drive) => SBAllocCallRet((s, sz) => PathBuildRoot(s, drive), "", 4);
+ /// Gets the short path form of the specified path.
+ /// The path to convert.
+ /// The short form of .
+ public static string GetShortPath(string path)
+ {
+ if (string.IsNullOrEmpty(path)) return path;
+ var shortPath = path;
+ var l = path.Length + 5;
+ var sb = new StringBuilder(l, l);
+ var rl = GetShortPathName(path.Length > MAX_PATH ? @"\\?\" + path : path, sb, (uint)sb.Capacity);
+ if (rl > 0 && rl <= l) shortPath = sb.ToString();
+ return shortPath;
+ }
///
/// Determines if a path string is a valid Universal Naming Convention (UNC) path and extract the name of the server from the path.