问题
What are all the possible MacID("filetype") I need the one specifically for CSV but i couldn't find a list anywhere online surprisingly.
回答1:
First run:
mdls "FileName"
Find the TypeCode in the Output:
kMDItemFSTypeCode = "TEXT"
You can use:
Dir(Path,MacID("TEXT"))
回答2:
Just a little aside for this thread.
Yes there are few places to find details of the MacIDs, but beware.
If a file is create on a PC it may not have its MacID set correctly, or at all for that matter.
I am working with Excel files created on both platforms. The XLSX ID is correct if the file is made on Mac but is empty if made on PC.
I have found the best solution is to ignore both forms of wildcards for the two platforms and instead just load all files and use the extension .xlsx
Hope this helps someone
Bob J.
来源:https://stackoverflow.com/questions/13292376/what-are-macid-filetypes-in-excel-vba