私はこれまでにこのようなことを試したことがないので、これをまとめました:
static class PathEscaper
{
    static readonly string invalidChars = @"""\/?:<>*|";
    static readonly string escapeChar = "%";
    static readonly Regex escaper = new Regex(
        "[" + Regex.Escape(escapeChar + invalidChars) + "]",
        RegexOptions.Compiled);
    static readonly Regex unescaper = new Regex(
        Regex.Escape(escapeChar) + "([0-9A-Z]{4})",
        RegexOptions.Compiled);
    public static string Escape(string path)
    {
        return escaper.Replace(path,
            m => escapeChar + ((short)(m.Value[0])).ToString("X4"));
    }
    public static string Unescape(string path)
    {
        return unescaper.Replace(path,
            m => ((char)Convert.ToInt16(m.Groups[1].Value, 16)).ToString());
    }
}
禁止されている文字を に置き換え、%その後にその 16 ビット表現を 16 進数で置き換え、その逆に置き換えます。(おそらく、あなたが持っている特定の文字を 8 ビットで表現することでうまくいくかもしれませんが、私は安全のために間違っていると思いました。)