如何得到文件(例:"C:\aa.txt")的若干信息:1.名称2.所在文件夹3.大小4.类型5.修改时间???

sunfei4000 2003-12-08 03:30:57
如何得到文件(例:"C:\aa.txt")的若干信息:
1.名称2.所在文件夹3.大小4.类型5.修改时间???
...全文
44 10 打赏 收藏 转发到动态 举报
写回复
用AI写文章
10 条回复
切换为时间正序
请发表友善的回复…
发表回复
guohong1219 2003-12-09
  • 打赏
  • 举报
回复
给我你的邮箱我刚刚做了一个
boydgmx 2003-12-08
  • 打赏
  • 举报
回复
FileSystemObject
SoHo_Andy 2003-12-08
  • 打赏
  • 举报
回复
已经发送
sunfei4000 2003-12-08
  • 打赏
  • 举报
回复
谢过lxcc(虫子)~~!@~@
flc 2003-12-08
  • 打赏
  • 举报
回复
关注
学习
帮你UP
sunfei4000 2003-12-08
  • 打赏
  • 举报
回复
delppiyelo@sina.com
lxcc 2003-12-08
  • 打赏
  • 举报
回复
Dim fso As New FileSystemObject
Private Sub Command1_Click()
'Normal 0 Normal file. No attributes are set.
'ReadOnly 1 Read-only file. Attribute is read/write.
'Hidden 2 Hidden file. Attribute is read/write.
'System 4 System file. Attribute is read/write.
'Volume 8 Disk drive volume label. Attribute is read-only.
'Directory 16 Folder or directory. Attribute is read-only.
'Archive 32 File has changed since last backup. Attribute is read/write.
'Alias 64 Link or shortcut. Attribute is read-only.
'Compressed 128 Compressed file. Attribute is read-only.

Dim file1 As File
Set file1 = fso.GetFile("D:\AdobeWeb.log")

Dim i As Integer
i = file1.Attributes
Select Case i
Case 0
MsgBox "正常"
Case 1
MsgBox "只读"
Case 2
MsgBox "隐藏"
Case 4
MsgBox "系统"
Case 8
MsgBox "驱动器"
Case 16
MsgBox "文件夹"
Case 32
MsgBox "文档"
Case 64
MsgBox "快捷方式"
Case 128
MsgBox "压缩"
End Select

Set file1 = Nothing
Set fso = Nothing
End Sub
sunfei4000 2003-12-08
  • 打赏
  • 举报
回复
如何得到文件(例:"C:\aa.txt")的若干信息:3.大小4.类型5.修改时间???
sssoft 2003-12-08
  • 打赏
  • 举报
回复
直接用DIR就可以阿
SoHo_Andy 2003-12-08
  • 打赏
  • 举报
回复
留个邮箱,发个例子给你

7,763

社区成员

发帖
与我相关
我的任务
社区描述
VB 基础类
社区管理员
  • VB基础类社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧