Access files with long paths (over 260)

The technique to convert MAXFILE encumbered DOS path names to native OS path names is well established and documented. Summarizing: Prefix a path that uses a drive letter with \\?\, like \\?\C:\foo\bar\baz.txt Prefix a path that uses a file share with ‘\\?\UNC\, like \\?\UNC\server\share\baz.txt. Works well with FileSystemObject too, at least when I tested your … Read more

Using VBA to get extended file attributes

You say loop .. so if you want to do this for a dir instead of the current document; Dim sFile As Variant Dim oShell: Set oShell = CreateObject(“Shell.Application”) Dim oDir: Set oDir = oShell.Namespace(“c:\foo”) For Each sFile In oDir.Items Debug.Print oDir.GetDetailsOf(sFile, XXX) Next Where XXX is an attribute column index, 9 for Author for … Read more