电脑文件类型代码

电脑教程012

电脑文件类型代码,第1张

Windows系统文件类型概览[推荐]

大家知道,Windows系统文件按照不同的格式和用途分很多种类,为便于管理和识别,在对文件命名时,是以扩展名加以区分的,即文件名格式为: "主文件名.扩展名"。这样就可以根据文件的扩展名,判定文件的种类,从而知道其格式和用途。例如:

"文件名1.DOC"的扩展名"DOC"表示本文件是一个"Microsoft Word 文档",

"文件名2.XLS"的扩展名"XLS"表示本文件是一个"Microsoft Excel 工作表",

"文件名3.BMP"的扩展名"BMP"表示本文件是一个"BMP格式图像",

"文件名4.MP3"的扩展名"MP3"表示本文件是一个"MP3 格式声音",

"文件名5.MPEG"的扩展名"MPEG"表示本文件是一个"电影文件(MPEG)"。

下面列出Windows系统文件的扩展名及其分类对照表,以备查阅:

1. "323" "H.323 Internet 电话技术"

2. "386" "虚拟设备驱动程序"

3. "ACA" "Microsoft Agent Character File (HTTP format)"

4. "ACF" "Microsoft Agent Character File (HTTP format)"

5. "ACG" "Microsoft Agent 预览文件"

6. "ACL" "自动更正列表文件"

7. "ACS" "Microsoft Agent Character File"

8. "ACW" "辅助功能向导设置"

9. "ADE" "Microsoft Access 项目扩展"

10. "ADN" "Microsoft Access 空白项目模板"

11. "ADP" "Microsoft Access 项目"

12. "AIF" "AIFF 格式声音"

13. "AIFC" "AIFF 格式声音"

14. "AIFF" "AIFF 格式声音"

15. "ANI" "动画光标"

16. "ASA" "活动服务器文档"

17. "ASD" "ASF Stream Description File"

18. "ASF" "Windows Media 音频/视频文件"

19. "ASP" "活动服务器文档"

20. "ASX" "Windows Media 音频/视频快捷方式"

21. "AU" "AU 格式声音"

22. "AUDIOCD" "AudioCD"

23. "AVI" "视频剪辑"

24. "AW" "应答向导文件"

25. "BKF" "Windows 备份文件"

26. "BLG" "性能监视器文件"

27. "BMP" "BMP 图像"

28. "CAT" "安全编录"

29. "CDA" "CD 音频曲目"

30. "CDF" "频道文件"

31. "CDX" "活动服务器文档"

32. "CER" "安全证书"

33. "CHK" "还原了文件碎片"

34. "CHM" "已编译的 HTML 帮助文件"

35. "CLP" "剪贴板剪贴"

36. "CNF" "快速拨号"

37. "COL" "HTML 帮助文件"

38. "CPL" "控制面板扩展"

39. "CRL" "证书吊销列表"

40. "CRT" "安全证书"

41. "CSS" "级联样式表文档"

42. "CSV" "Microsoft Excel 逗号分隔值文件"

43. "CUR" "光标"

44. "DB" "数据库文件"

45. "DCS" "数据库内容源"

46. "DER" "安全证书"

47. "DESKLINK" "DESKLINK 文件"

48. "DET" "Office Data File"

49. "DIB" "BMP 图像"

50. "DIC" "文本文档"

51. "DIF" "Microsoft Excel 数据交换格式"

52. "DOC" "Microsoft Word 文档"

53. "DOCHTML" "Microsoft Word HTML 文档"

54. "DOCMHTML" "DOCMHTML 文件"

55. "DOT" "Microsoft Word 模板"

56. "DOTHTML" "Microsoft Word HTML 模板"

57. "DQY" "Microsoft Excel ODBC 查询文件"

58. "DRV" "设备驱动程序"

59. "DSN" "数据源名称"

60. "DUN" "拨号网络文件"

61. "DVD" "DVD"

62. "ECS" "Exchange Server 内容源"

63. "ELM" "Microsoft Office 主题文件"

64. "EMF" "EMF 图像"

65. "EML" "Outlook Express 邮件消息"

66. "EXC" "文本文档"

67. "FAD" "Office 数据文件"

68. "FAV" "FAV 文件"

69. "FCS" "文件共享内容源"

70. "FFA" "文件检索索引"

71. "FFL" "文件检索索引"

72. "FFT" "文件检索索引"

73. "FFX" "文件检索索引"

74. "FON" "字体文件"

75. "FPDOCLIB" "Microsoft FrontPage Document Library"

76"FPHOMEOP" Microsoft FrontPage Home Page Open"

77. "FPHOMEPG" "Microsoft FrontPage 主页"

78. "FPHTML""Microsoft FrontPage HTML 文档"

79. "FPLIST" "Microsoft FrontPage List"

80. "FPNOPUB" "Microsoft FrontPage Dont Publish"

81. "FPOPEN" "Microsoft FrontPage 打开文件"

82. "FPSURVEY" "Microsoft FrontPage Survey"

83. "FPWEB" "FPWEB 文件"

84. "FRG" "FRG 文件"

85. "GIF" "GIF 图像"

86. "GRA" "Microsoft Graph 图表"

87. "GRP" "Microsoft 程序组"

88. "HLP" "帮助文件"

89. "HOL" "Microsoft Outlook Holidays"

90. "HT" "超级终端文件"

91. "HTA" "HTML Application"

92. "HTC" "HTC 文件"

93. "HTM" "HTML Document"

94. "HTML" "HTML Document"

95. "HTT" "HyperText 模板"

96. "HTX""用于 Internet 数据库的 HTML 模板"

97. "ICC" "ICC 配置文件"

98. "ICM" "ICC 配置文件"

99. "ICO" "图标"

100. "ICS" "iCalendar 文件"

101. "IDC" "IDC 文件"

102. "III" "Intel IPhone 兼容"

103. "INF" "安装信息"

104. "INI" "配置设置"

105. "INS" "Internet 通讯设置"

106. "IQY" "Microsoft Excel Web 查询文件"

107. "ISP" "Internet 通讯设置"

108. "ITS" "Internet Document Set"

109. "ITSS" "Microsoft Infotech Storage System File"

110. "IVF" "Indeo 视频文件"

111. "JFIF" "JPEG 图像"

112. "JOB" "任务对象"

113. "JOD" "Microsoft.Jet.OLEDB.4.0"

114. "JPE" "JPEG 图像"

115. "JPEG" "JPEG 图像"

116. "JPG" "JPEG 图像"

117. "JS" "JScript Script File"

118. "JSE" "JScript Encoded Script File"

119. "LDB" "Microsoft Access 记录锁定信息"

120. "LEX" "词典文件"

121. "LOG" "文本文档"

122"LWV" Microsoft Linguistically Enhanced Sound File"

123. "M1V" "电影文件(MPEG)"

124. "M3U" "M3U 文件"

125. "MAD" "Microsoft Access 模块快捷方式"

126. "MAF" "Microsoft Access 窗体快捷方式"

127. "MAG" "Microsoft Access 图表快捷方式"

128. "MAM" "Microsoft Access 宏快捷方式"

129. "MAPIMAIL" "MAPIMAIL 文件"

130. "MAQ" "Microsoft Access 查询快捷方式"

131. "MAR" "Microsoft Access 报表快捷方式"

132. "MAS"Microsoft Access 存储过程快捷方式"

133. "MAT" "Microsoft Access 表快捷方式"

134. "MAU" "MAU 文件"

135. "MAV" "Microsoft Access 视图快捷方式"

136"MAW"Microsoft Access 数据访问页快捷方式"

137. "MDA" "Microsoft Access 加载项"

138. "MDB" "Microsoft Access 应用程序"

139. "MDBHTML" "Microsoft Access HTML 文档"

140. "MDE" "Microsoft Access MDE 数据库"

141. "MDN""Microsoft Access 空白数据库模板"

142. "MDT" "Microsoft Access 加载项数据"

143. "MDW" "Microsoft Access 工作组信息"

144. "MDZ""Microsoft Access 数据库向导模板"

145. "MGC" "媒体目录文件"

146. "MHT" "MHTML Document"

147. "MHTML" "MHTML Document"

148. "MID" "MIDI 序列"

149. "MIDI" "MIDI 序列"

150. "MML" "媒体目录文件"

151. "MMM" "媒体剪辑"

152. "MMW" "媒体目录文件"

153. "MP2" "电影文件(MPEG)"

154. "MP2V" "电影文件(MPEG)"

155. "MP3" "MP3 格式声音"

156. "MPA" "电影文件(MPEG)"

157. "MPE" "电影文件(MPEG)"

158. "MPEG" "电影文件(MPEG)"

159. "MPF" "Media Package 文件"

160. "MPG" "电影文件(MPEG)"

161. "MPV2" "电影文件(MPEG)"

162. "MSC" "Microsoft 通用管理文档"

163. "MSG" "Outlook 项目"

164. "MSI" "Windows Installer 软件包"

165. "MSP" "Windows Installer 修补程序"

166. "MSRCINCIDENT" "Microsoft 远程访问事件"

167. "MSSTYLES" "Windows 可视化风格文件"

168. "MSWMM" "Windows Movie Maker 项目"

169. "NCS" "Lotus Notes 内容源"

170. "NFO" "MSInfo 文档"

171. "NICK" "Office 数据文件"

172. "NK2" "Office 数据文件"

173."NMW""Microsoft NetMeeting T126 兼容白板文档"

174. "NWS" "Outlook Express 新闻消息"

175. "OBD" "OBD 文件"

176. "OBT" "OBT 文件"

177. "OBZ" "OBZ 文件"

178. "OCX" "ActiveX 控件"

179. "ODC" "Microsoft Office 数据连接"

180. "ODCCUBEFILE" "ODCCUBEFILE 文件"

181. "ODCDATABASEFILE" "ODCDATABASEFILE 文件"

182. "ODCNEWFILE" "ODCNEWFILE 文件"

183. "ODCTABLEFILE" "ODCTABLEFILE 文件"

184. "OFT" "Outlook 项目模板"

185. "OPC" "Microsoft 清理向导文件"

186. "OPS" "Office 10 设置文件"

187. "OQY" "Microsoft Excel OLAP 查询文件"

188. "OSS" "Office 搜索"

189. "OST" "Office 数据文件"

190. "OTF" "OpenType 字体文件"

191. "P10" "证书申请"

192. "P12" "Personal Information Exchange"

193. "P7B" "PKCS #7 证书"

194. "P7C" "数字标识文件"

195. "P7M" "PKCS #7 MIME 消息"

196. "P7R" "PKCS #7 证书"

197. "P7S" "PKCS #7 签名"

198. "PAB" "Office 数据文件"

199. "PBK" "拨号电话簿"

200. "PCB" "PCB 文件"

201. "PCD" "Photo CD 图像"

202. "PCX" "PCX 图像"

203. "PFM" "Type 1 字体文件"

204. "PFX" "Personal Information Exchange"

205. "PIP" "Microsoft Office 设置文件"

206. "PKO" "公钥安全对象"

207. "PMA" "性能监视器文件"

208. "PMC" "性能监视器文件"

209. "PML" "性能监视器文件"

210. "PMR" "性能监视器文件"

211. "PMW" "性能监视器文件"

212. "PNG" "PNG 图像"

213. "POT" "Microsoft PowerPoint 模板"

214. "POTHTML" "Microsoft PowerPoint HTML 模板"

215. "PPA" "Microsoft PowerPoint 加载项"

216. "PPS" "Microsoft PowerPoint 幻灯片放映"

217. "PPT" "Microsoft PowerPoint 演示文稿"

218. "PPTHTML" "Microsoft PowerPoint HTML 文档"

219. "PPTMHTML" "PPTMHTML 文件"

220. "PRF" "msrating.dll,-3001"

221. "PST" "Office 数据文件"

222. "PSW" "Password Backup"

223. "PWZ" "Microsoft PowerPoint 向导"

224. "QDS" "目录查询"

225. "RAT" "msrating.dll,-3000"

226. "RDP" "远程桌面连接"

227. "REG" "注册表项"

228. "RMI" "MIDI 序列"

229. "RNK" "拨号快捷方式"

230. "RQY" "Microsoft Excel OLE DB 查询文件"

231. "RTF" "RTF 格式"

232. "RWZ" "Office 数据文件"

233. "SC2" "Microsoft Schedule+ 应用程序"

234. "SCD" "Microsoft Schedule+ 应用程序"

235. "SCH" "Microsoft Schedule+ 应用程序"

236. "SCP" "文本文档"

237. "SCT" "Windows Script Component"

238. "SDB" "Appfix 软件包"

239. "SHB" "将快捷方式插入到文档"

240. "SHS" "片段对象"

241. "SHTM" "HTML Document"

242. "SHTML" "HTML Document"

243. "SLK" "Microsoft Excel SLK 数据导入格式"

244. "SLL" "SLL 文件"

245. "SND" "AU 格式声音"

246. "SNP" "Snapshot 文件"

247. "SPC" "PKCS #7 证书"

248. "SPL" "Shockwave Flash Object"

249. "SST" "Microsoft 系列证书存储"

250. "STF" "Microsoft 安装文件"

251. "STL" "证书信任列表"

252. "STM" "HTML Document"

253. "SWF" "Shockwave Flash Object"

254. "SYS" "系统文件"

255. "TCS" "Tahoe Server 内容源"

256. "THEME" "Windows 主题文件"

257. "TIF" "TIF 图像"

258. "TIFF" "TIF 图像"

259. "TTC" "TrueType Collection 字体文件"

260. "TTF" "TrueType 字体文件"

261. "TXT" "文本文档"

262. "UDL" "Microsoft 数据链接"

263. "ULS" "Internet 定位服务"

264. "URL" "Internet 快捷方式"

265. "VBE" "VBScript Encoded Script File"

266. "VBS" "VBScript Script File"

267. "VCF" "vCard 文件"

268. "VCS" "vCalendar 文件"

269. "VXD" "虚拟设备驱动程序"

270. "WAB" "数字标识文件"

271. "WAV" "波形声音"

272. "WAX" "Windows Media 音频快捷方式"

273. "WBK" "Microsoft Word 备份文档"

274. "WCS" "Web 站点内容源"

275. "WEB" "Office 数据文件"

276. "WEBPNP" "Webpnp"

277. "WHT" "Microsoft NetMeeting 旧白板文档"

278. "WIZ" "Microsoft Word 向导"

279. "WIZHTML" "Microsoft Access HTML 模板"

280. "WLL" "WLL 文件"

281. "WM" "Windows Media 音频/视频文件"

282. "WMA" "Windows Media 音频文件"

283. "WMD" "Windows Media Player 下载软件包"

284. "WMF" "WMF 图像"

285. "WMP" "Windows Media Player 文件"

286. "WMS" "Windows Media Player 外观文件"

287. "WMV" "Windows Media 音频/视频文件"

288. "WMX" "Windows Media 音频/视频快捷方式"

289. "WMZ" "Windows Media Player 外观程序包"

290. "WPS" "WPS 文件"

291. "WRI" "写入文档"

292. "WSC" "Windows Script Component"

293. "WSF" "Windows Script File"

294. "WSH" "Windows Script Host Settings File"

295. "WTX" "文本文档"

296. "WVX" "Windows Media 音频/视频快捷方式"

297. "XLA" "Microsoft Excel 加载宏"

298. "XLB" "Microsoft Excel 工作表"

299. "XLC" "Microsoft Excel 图表"

300. "XLD" "Microsoft Excel 5.0 对话框编辑表"

301. "XLK" "Microsoft Excel 备份文件"

302. "XLL" "Microsoft Excel XLL 加载宏"

303. "XLM" "Microsoft Excel 4.0 宏"

304. "XLS" "Microsoft Excel 工作表"

305. "XLSHTML" "Microsoft Excel HTML 文档"

306. "XLSMHTML" "XLSMHTML 文件"

307. "XLT" "Microsoft Excel 模板"

308. "XLTHTML" "Microsoft Excel HTML 模板"

309. "XLV" "Microsoft Excel VBA 模块"

310. "XLW" "Microsoft Excel 工作区"

311. "XML" "XML 文档"

312. "XNK" "Exchange 快捷方式"

313. "XSL" "XSL 样式表"

314. "ZAP" "软件安装设置"

315. "ZIP" "压缩(zipped)文件夹"

#include<stdio.h>

void main()

{

    FILE *f

    f=fopen("文件路径+文件名","r")//打开文件用于读操作

    *********

    fclose(f)

}

使用系统API函数ShellExecute实现打开文件。执行后会调用与要打开文件扩展名关联的程序打开这个文件。

Private Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hwnd As Long, ByVal lpOperation As String, ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long

Private Sub Form_click()

ShellExecute(Me.hwnd, "open", "z:\test.txt", "", "", 1)

End sub

函数参数及意义:

ShellExecute(

hWnd: HWND {指定父窗口句柄}

Operation: PChar {指定动作, 譬如: open、runas、print、edit、explore、find[2]  }

FileName: PChar {指定要打开的文件或程序}

Parameters: PChar {给要打开的程序指定参数 如果打开的是文件这里应该是 nil}

Directory: PChar {缺省目录}

ShowCmd: Integer {打开选项}

): HINST

ShowCmd 参数可选值:SW_HIDE = 0 {隐藏}

SW_SHOWNORMAL = 1 {用最近的大小和位置显示, 激活}

SW_NORMAL = 1 {同 SW_SHOWNORMAL}

SW_SHOWMINIMIZED = 2 {最小化, 激活}

SW_SHOWMAXIMIZED = 3 {最大化, 激活}

SW_MAXIMIZE = 3 {同 SW_SHOWMAXIMIZED}

SW_SHOWNOACTIVATE = 4 {用最近的大小和位置显示, 不激活}

SW_SHOW = 5 {同 SW_SHOWNORMAL}

SW_MINIMIZE = 6 {最小化, 不激活}

SW_SHOWMINNOACTIVE = 7 {同 SW_MINIMIZE}

SW_SHOWNA = 8 {同 SW_SHOWNOACTIVATE}

SW_RESTORE = 9 {同 SW_SHOWNORMAL}

SW_SHOWDEFAULT = 10 {同 SW_SHOWNORMAL}

SW_MAX = 10 {同 SW_SHOWNORMAL}

WIN8系统调用此函数打开文件无效。