码迷,mamicode.com
首页 > Windows程序 > 详细

c# 获取文件信息

时间:2020-04-01 10:33:03      阅读:112      评论:0      收藏:0      [点我收藏+]

标签: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,

        /// <summary>
        /// 时长
        /// </summary>
        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

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!