Short Path files

Sub foo() Dim fso As Object, fsofile As Object, strShortName As String Dim fsofolder As Object Set fso = CreateObject("scripting.filesystemobject") Set fsofolder = fso.getfolder("C:\Users\Isaac \Desktop\Bills") For Each fsofile In fsofolder.Files MsgBox fsofile.shortpath Next fsofile End Sub
@Isaac
Thanks for that code. I'd forgotten about ShortPath being available from FSO
 
Thanks all, very useful information in all of the thread. The code "shell aplication" works great! However I will speak to the users as some of their directory names and file names are out of control (i.e Collecties\Museum algemeen\Archief\Tentoonstellingen en presentaties\Wisseltentoonstellingen\2024 Tentoonstelling Mensen maken het verschil\Indeling onderwerpen 2024\6 CTT conducteurs tram\)

More knowledge and experience everyday! - Andy
 

Users who are viewing this thread

Back
Top Bottom