c# 获取文件信息

2021-03-11 23:29

阅读:620

标签:parse   rip   add   company   cat   sar   one   album   ret   

public enum AudioValueEnum
    {
        Name = 0,
        Size = 1,
        Type = 2,
        DateModified = 3,
        DateCreated = 4,
        DateAccessed = 5,
        Attributes = 6,
        Offlinestatus = 7,
        OfflineAvailability = 8,
        PerceivedType = 9,
        Owner = 10,
        Kinds = 11,
        DateTaken = 12,
        Artists = 13,
        Album = 14,
        Year = 15,
        Genre = 16,
        Conductors = 17,
        Tags = 18,
        Rating = 19,
        Authors = 20,
        Title = 21,
        Subject = 22,
        Categories = 23,
        Comments = 24,
        Copyright = 25,

        /// 
        /// 时长
        /// 
        Length = 27,
        BitRate = 28,
        Protected = 29,
        CameraModel = 30,
        Dimensions = 31,
        CameraMaker = 32,
        Company = 33,
        FileDescription = 34,
        ProgramName = 35,
        Duration = 36,
        IsOnline = 37,
        IsRecurring = 38,
        Location = 39,
        OptionalAttendeeAddresses = 40,
        OptionalAttendees = 41,
        OrganizerAddress = 42,
        OrganizerName = 43,
        ReminderTime = 44,
        RequiredAttendeeAddresses = 45,
        RequiredAttendees = 46,
        Resources = 47,
        Free_BusyStatus = 48,
        TotalSize = 49,
        AccountName = 50,
        Computer = 51,
        Anniversary = 52,
        AssistantName = 53,
        AssistantPhone = 54,
        Birthday = 55,
        BusinessAddress = 56,
        BusinessCity = 57,
        BusinessCountryRegion = 58,
        BusinessPOBox = 59,
        BusinessPostalCode = 60,
        BusinessStateProvince = 61,
        BusinessStreet = 62,
        BusinessFax = 63,
        BusinessHomePage = 64,
        BusinessPhone = 65,
        CallbackNumber = 66,
        CarPhone = 67,
        Children = 68,
        CompanyMainPhone = 69,
        Department = 70,
        EMailAddress = 71,
        EMail2 = 72,
        EMail3 = 73,
        EMailList = 74,
        EMailDisplayName = 75,
        FileAs = 76,
        FirstName = 77,
        FullName = 78,
        Gender = 79,
        GivenName = 80,
        Hobbies = 81,
        HomeAddress = 82,
        HomeCity = 83,
        HomeCountryRegion = 84,
        HomePObox = 85,
        HomePostalCode = 86,
    }
public class AudioEx
    {
        public static string GetField(string fileName, AudioValueEnum fieldEnum)
        {
            string[] Info = new string[7];

            ShellClass sh = new ShellClass();

            Folder dir = sh.NameSpace(Path.GetDirectoryName(fileName));

            FolderItem item = dir.ParseName(Path.GetFileName(fileName));

            return dir.GetDetailsOf(item, (int)fieldEnum);
        }
    }

c# 获取文件信息

标签:parse   rip   add   company   cat   sar   one   album   ret   

原文地址:https://www.cnblogs.com/ives/p/12610578.html


评论


亲,登录后才可以留言!