数码资讯
各种操作类,如文件、目录、文本文件等。
在上一篇文章中也提到了使用FSO的类。
选购提示
关注价格、性能、续航、售后和真实使用场景,理性比较后再下单。
在上一篇文章中也提到了使用FSO的类。
<
昏暗的myfilefolder
集myfilefolder =新filefoldercls
Response.Write MyFileFolder.MoveAFile(F: 123 4561 的文件。
Response.Write MyFileFolder.MoveAFolder(F: 456
Response.Write MyFileFolder.ShowFileSystemType(我)
Response.Write MyFileFolder.CopyAFile(F: 123 4562 。txt
'!!!!
Response.Write MyFileFolder.CopyAFolder(F: 123
Response.Write MyFileFolder.ShowFolderList(F: ditg )
Response.Write MyFileFolder.ShowFileList(F: 123 123 )
Response.Write MyFileFolder.DeleteAFile(F: 123 4562 .txt)
Response.Write MyFileFolder.DeleteAFolder(F: 456 )
Response.Write MyFileFolder.CreateFolderDemo(F: 147 )
Response.Write MyFileFolder.GetFileSize(F: 123 4563 .txt)
Response.Write MyFileFolder.GetFolderSize(F: 123 123 .txt)
Response.Write MyFileFolder.ShowFileAccessInfo(F: 123 123 。txt
Response.Write MyFileFolder.ShowFileAccessInfo(F: 123 123 。txt
Response.Write MyFileFolder.ShowFileAccessInfo(F: 123 123 。txt
Response.Write MyFileFolder.ShowFileAccessInfo(F: 123 123 。txt
Response.Write MyFileFolder.ShowFileAccessInfo(F: 123 123 。txt
Response.Write MyFileFolder.ShowFileAccessInfo(F: 123 123 。txt
Response.Write MyFileFolder.ShowFileAccessInfo(F: 123 123 。txt
Response.Write MyFileFolder.ShowFileAccessInfo(F: 123 123 。txt
Response.Write MyFileFolder.ShowFolderAccessInfo(F: 123
Response.Write MyFileFolder.ShowFolderAccessInfo(F: 123
Response.Write MyFileFolder.ShowFolderAccessInfo(F: 123
Response.Write MyFileFolder.ShowFolderAccessInfo(F: 123
Response.Write MyFileFolder.ShowFolderAccessInfo(F: 123
Response.Write MyFileFolder.ShowFolderAccessInfo(F: 123
Response.Write MyFileFolder.ShowFolderAccessInfo(F: 123
Response.Write MyFileFolder.ShowFolderAccessInfo(F: 123
Response.Write MyFileFolder.WriteTxtFile(F: 123 cexo .txt
Response.Write MyFileFolder.WriteTxtFile(F: 123 cexo .txt
Response.Write MyFileFolder.WriteTxtFile(F: 123 cexo .txt
cexowxfdw
Response.Write MyFileFolder.ReadTxtFile(F: 123 cexo .txt )
响应。写myfilefolder.displayleveldepth(F: ditg ditg 部门图片)
类filefoldercls
公共通信
私有子class_initialize()
设置FSO = CreateObject(脚本。FileSystemObject )
端子
私有子class_terminate()
设置FSO
端子
/ / ==================================文件操作==================================
取文件大小
函数得到指定文件的大小(文件名)
函数:文件大小
参数:文件名
'''返回:作为1失败的文件大小的成功
昏暗的F
如果reportfilestatus(文件名)= 1
集F = FSO GetFile(文件名)。
得到指定文件的大小= F的大小
其他的
得到指定文件的大小= 1
最后如果
端功能
文件删除
功能deleteafile(filespec)
函数:删除文件
参数:文件名
''返回:成功是1,失败是- 1
如果reportfilestatus(filespec)= 1
fso.deletefile(filespec)
deleteafile = 1
其他的
deleteafile = - 1
最后如果
端功能
显示文件列表
功能showfilelist(folderspec)
函数:当目录存在时,显示该目录中的所有文件。
参数:目录名
''返回:为1失败的文件列表成功
F,f1,FC,s
如果reportfolderstatus(folderspec)= 1
集F = fso.getfolder(folderspec)
设置FC = f文件
对于每一个F1在FC
S = S f1.name
S = 的|
下一个
showfilelist = S
其他的
showfilelist = - 1
最后如果
端功能
'!!!
文件复制
功能copyafile(源文件,destinationfile)
函数:存在源文件,复制文件,不影响文件。
参数:源文件、对象文件
''返回:成功是1,失败是- 1
昏暗的来
如果reportfilestatus(源文件)= 1
集来= fso.getfile(源文件)
文件中复制(destinationfile)。
copyafile = 1
其他的
copyafile = - 1
最后如果
端功能
文件移动
Response.Write MoveAFile(F: 123 4561 的文件。
功能moveafile(源文件,destinationfile)
函数:当文件的目的不存在以移动文件时,存在源文件。
参数:源文件、对象文件
''返回:成功是1,失败是- 1
如果reportfilestatus(源文件)= 1和reportfilestatus(destinationfileorpath)= =
1然后
Fso.MoveFile SourceFile,DestinationFileORPath
moveafile = 1
其他的
moveafile = - 1
最后如果
端功能
文件存在吗
response.write reportfilestatus(G:经常 my_pro Delphi代码库文件。)
功能reportfilestatus(文件名)
功能: / /找到
参数:文件名
''返回:成功是1,失败是- 1
昏暗的味精
MSG = 1
如果(fso.fileexists(文件名))然后
味精= 1
其他的
MSG = 1
最后如果
reportfilestatus =味精
端功能
文件创建日期
response.write showdatecreated(G:经常 my_pro Delphi代码库文件。)
response.write showdatecreated(G:经常 复杂my_pro Delphi代码库。exe)
功能showdatecreated(filespec)
函数:文件创建日期
参数:文件名
''返回:成功:未能创建文件日期:- 1
昏暗的F
如果reportfilestatus(filespec)= 1
集F = fso.getfile(filespec)
showdatecreated = f.datecreated
其他的
showdatecreated = - 1
最后如果
端功能
文件属性
Response.Write GetAttributes(G:经常 复杂my_pro Delphi代码库。exe)
功能getattributes(文件名)
函数:显示文件属性
参数:文件名
返回:成功:文件属性,失败:- 1
昏暗的F
如果reportfilestatus(文件名)= 1
集F = fso.getfile(文件名)
选择案例f.attributes
案例0普通文件。没有设置属性。
案例1只读文件可读写。
案例2隐藏文件可读写。
案例4系统文件可读写。
案例16文件夹或目录只读。
案例32=在上次备份后更改的文件。可读性和写入性。
案例1024链接或快捷方式。只读。
案例2048压缩文件。只读。
最后选择
getattributes = str
其他的
getattributes = - 1
最后如果
端功能
''上次访问/上次修改时间
Response.Write ShowFileAccessInfo(G:经常 复杂my_pro Delphi代码库。exe)
功能showfileaccessinfo(filename,信息类型)
函数:在创建文件时显示信息
参数:文件名、类别信息
1 -创建时间
2——最后一次访问时间
3,最后修改时间
4 -//文件路径
5文件名
6文件类型
文件大小为7
8 -/父目录
9根目录
返回:成功是在创建文件时失败的:- 1
暗淡的F
如果reportfilestatus(文件名)= 1
集F = fso.getfile(文件名)
选择信息类型
S = f.datecreated / / 1 - 1
创建时间
案例2 S = f.datelastaccessed / / 2 -最后的访问
时间
案例3 S = f.datelastmodified - 3 / /最后的修饰
时间
案例4 S = 4 f.path / /
——文件路径
案例5 S = 5 f.name / /
---文件的名称
案例6 S = 6 f.type / /
----文件类型
案例7 S = 7 f.size / /
——文件大小
S = f.parentfolder / / 8 - 8
父目录
S = f.rootfolder / / 8 - 9
根目录
最后选择
showfileaccessinfo = S
其他的
showfileaccessinfo = - 1
最后如果
端功能
写一个文本文件
Function WriteTxtFile (FileName, TextStr, WriteORAppendType)
Const ForReading = 1 = 2,写字,forappending = 8
亮度f
选择案例writeorappendtype
案例1:文件写操作
集F = fso.opentextfile(filename,写作,真的)
F.写textstr
F.关闭
如果reportfilestatus(文件名)= 1
writetxtfile = 1
其他的
writetxtfile = - 1
最后如果
在案例2的结尾写操作:文件
如果reportfilestatus(文件名)= 1
集F = fso.opentextfile(filename,forappending)
F.写textstr
F.关闭
writetxtfile = 1
其他的
writetxtfile = - 1
最后如果
最后选择
端功能
读取文本文件
功能readtxtfile(文件名)
Const ForReading = 1,= 2等
亮度f
如果reportfilestatus(文件名)= 1
集F = fso.opentextfile(文件名,ForReading)
M = f.readline
我= f.readall
f.skipline
readtxtfile = M
F.关闭
其他的
readtxtfile = - 1
最后如果
端功能
创建文本文件
/ / ==================================目录操作==================================
取目录大小
功能getfoldersize(相似的)
函数:目录大小
参数:目录名
''返回:成功的目录大小,失败是- 1
昏暗的F
如果reportfolderstatus(相似的)= 1
集F = fso.getfolder(相似的)
getfoldersize = F的大小
其他的
getfoldersize = - 1
最后如果
端功能
'创建文件夹
函数的CreateFolderDemo(相似的)
函数:创建文件夹
参数:目录名
''返回:成功是1,失败是- 1
昏暗的F
如果reportfolderstatus(folderspec)= 1
CreateFolderDemo = 1
其他的
集F = fso.createfolder(相似的)
createfolderdemo = 1
最后如果
端功能
'!!!
目录删除
函数的DeleteAFolder(folderspec)
函数:删除目录
参数:目录名
''返回:成功是1,失败是- 1
response.write folderspec
如果reportfolderstatus(folderspec)= 1
Fso.DeleteFolder(folderspec)
deleteafolder = 1
其他的
deleteafolder = - 1
最后如果
端功能
显示列表列表
功能showfolderlist(folderspec)
/ /功能:显示目录下所有子目录下,这个目录存在
参数:目录名
/ /返回:一列目录,失败是1
F,f1,FC,s
如果reportfolderstatus(folderspec)= 1
集F = fso.getfolder(folderspec)
集f.subfolders FC =
对于每一个F1在FC
S = S f1.name
S = 的|
下一个
showfolderlist = S
其他的
showfolderlist = - 1
最后如果
端功能
'!!!!
目录复制
功能copyafolder(sourcefolder,destinationfolder)
函数:源目录存在于目录复制,而不影响目标目录。
参数:目录中的源目录
''返回:成功是1,失败是- 1
'dim myfolder
如果reportfolderstatus(sourcefolder)= 1和reportfolderstatus
(destinationfolder)- 1 =然后
让myfolder = fso.getfolder(sourcefolder)
Fso.CopyFolder SourceFolder,destinationfolder
copyafolder = 1
'else
copyafolder = - 1
如果
端功能
目录被移动
功能moveafolder(SourcePath,destinationpath)
函数:源目录存在时,目的地目录不存在,无法移动到目录。
参数:目录中的源目录
''返回:成功是1,失败是- 1
如果reportfolderstatus(sourcepath)= 1和reportfolderstatus(destinationpath)= 0
然后
Fso.MoveFolder SourcePath,DestinationPath
moveafolder = 1
其他的
moveafolder = - 1
最后如果
端功能
确定目录的存在
response.write reportfolderstatus(G:经常 my_pro Delphi )
功能reportfolderstatus(科学)
功能: / /判断目录是否存在
参数:目录
''返回:成功是1,失败是- 1
昏暗的味精
MSG = 1
如果(fso.folderexists(FLDR))然后
味精= 1
其他的
MSG = 1
最后如果
reportfolderstatus =味精
端功能
目录创建信息
showfolderaccessinfo(相似的功能,信息类型)
函数:显示目录信息
参数:目录名、类别信息
1 -创建时间
2——最后一次访问时间
3,最后修改时间
4 -目录路径
5目录名
6目录类型
7目录大小
8 -/父目录
9根目录
返回:成功的目录创建信息失败:- 1
暗淡的F
如果reportfolderstatus(相似的)= 1
集F = fso.getfolder(相似的)
选择信息类型
S = f.datecreated / / 1 - 1
创建时间
案例2 S = f.datelastaccessed / / 2 -最后的访问
时间
案例3 S = f.datelastmodified - 3 / /最后的修饰
时间
案例4 S = 4 f.path / /
——文件路径
案例5 S = 5 f.name / /
---文件的名称
案例6 S = 6 f.type / /
----文件类型
案例7 S = 7 f.size / /
——文件大小
S = f.parentfolder / / 8 - 8
父目录
S = f.rootfolder / / 9 - 9
根目录
最后选择
showfolderaccessinfo = S
其他的
showfolderaccessinfo = - 1
最后如果
端功能
功能displayleveldepth(pathspec)
暗淡的F,N,Path
集F = fso.getfolder(pathspec)
如果f.isrootfolder然后
displayleveldepth =指定文件夹的根文件夹。RootFolder
其他的
直到f.isrootfolder做
路径=路径f.name
集F = f.parentfolder
n=n+1
环
displayleveldepth = 指定的文件夹是一个嵌套级别的N文件夹。
路径
最后如果
端功能
/ / ==================================磁盘操作==================================
驱动器存在吗
response.write reportdrivestatus(C:)
功能reportdrivestatus(DRV)
函数:确定是否有磁盘
参数:磁盘
''返回:成功是1,失败是- 1
昏暗的味精
MSG = 1
如果fso.driveexists(DRV)然后
味精= 1
其他的
MSG = 1
最后如果
reportdrivestatus =味精
端功能
--------可返回类型包括脂肪、NTFS和CDFS。
Response.Write ShowFileSystemType(C:)
功能showfilesystemtype(drvspec)
函数:磁盘类型
参数:磁盘名
/ /返回:成功的类型:脂肪,NTFS和CDFS,失败:1
昏暗的D
如果reportdrivestatus(drvspec)= 1
设置d = FSO。getdrive(drvspec)
showfilesystemtype = d.filesystem
其他的
showfilesystemtype = - 1
最后如果
端功能
类的结束
%>
<
昏暗的myfilefolder
集myfilefolder =新filefoldercls
Response.Write MyFileFolder.MoveAFile(F: 123 4561 的文件。
Response.Write MyFileFolder.MoveAFolder(F: 456
Response.Write MyFileFolder.ShowFileSystemType(我)
Response.Write MyFileFolder.CopyAFile(F: 123 4562 。txt
'!!!!
Response.Write MyFileFolder.CopyAFolder(F: 123
Response.Write MyFileFolder.ShowFolderList(F: ditg )
Response.Write MyFileFolder.ShowFileList(F: 123 123 )
Response.Write MyFileFolder.DeleteAFile(F: 123 4562 .txt)
Response.Write MyFileFolder.DeleteAFolder(F: 456 )
Response.Write MyFileFolder.CreateFolderDemo(F: 147 )
Response.Write MyFileFolder.GetFileSize(F: 123 4563 .txt)
Response.Write MyFileFolder.GetFolderSize(F: 123 123 .txt)
Response.Write MyFileFolder.ShowFileAccessInfo(F: 123 123 。txt
Response.Write MyFileFolder.ShowFileAccessInfo(F: 123 123 。txt
Response.Write MyFileFolder.ShowFileAccessInfo(F: 123 123 。txt
Response.Write MyFileFolder.ShowFileAccessInfo(F: 123 123 。txt
Response.Write MyFileFolder.ShowFileAccessInfo(F: 123 123 。txt
Response.Write MyFileFolder.ShowFileAccessInfo(F: 123 123 。txt
Response.Write MyFileFolder.ShowFileAccessInfo(F: 123 123 。txt
Response.Write MyFileFolder.ShowFileAccessInfo(F: 123 123 。txt
Response.Write MyFileFolder.ShowFolderAccessInfo(F: 123
Response.Write MyFileFolder.ShowFolderAccessInfo(F: 123
Response.Write MyFileFolder.ShowFolderAccessInfo(F: 123
Response.Write MyFileFolder.ShowFolderAccessInfo(F: 123
Response.Write MyFileFolder.ShowFolderAccessInfo(F: 123
Response.Write MyFileFolder.ShowFolderAccessInfo(F: 123
Response.Write MyFileFolder.ShowFolderAccessInfo(F: 123
Response.Write MyFileFolder.ShowFolderAccessInfo(F: 123
Response.Write MyFileFolder.WriteTxtFile(F: 123 cexo .txt
Response.Write MyFileFolder.WriteTxtFile(F: 123 cexo .txt
Response.Write MyFileFolder.WriteTxtFile(F: 123 cexo .txt
cexowxfdw
Response.Write MyFileFolder.ReadTxtFile(F: 123 cexo .txt )
响应。写myfilefolder.displayleveldepth(F: ditg ditg 部门图片)
类filefoldercls
公共通信
私有子class_initialize()
设置FSO = CreateObject(脚本。FileSystemObject )
端子
私有子class_terminate()
设置FSO
端子
/ / ==================================文件操作==================================
取文件大小
函数得到指定文件的大小(文件名)
函数:文件大小
参数:文件名
'''返回:作为1失败的文件大小的成功
昏暗的F
如果reportfilestatus(文件名)= 1
集F = FSO GetFile(文件名)。
得到指定文件的大小= F的大小
其他的
得到指定文件的大小= 1
最后如果
端功能
文件删除
功能deleteafile(filespec)
函数:删除文件
参数:文件名
''返回:成功是1,失败是- 1
如果reportfilestatus(filespec)= 1
fso.deletefile(filespec)
deleteafile = 1
其他的
deleteafile = - 1
最后如果
端功能
显示文件列表
功能showfilelist(folderspec)
函数:当目录存在时,显示该目录中的所有文件。
参数:目录名
''返回:为1失败的文件列表成功
F,f1,FC,s
如果reportfolderstatus(folderspec)= 1
集F = fso.getfolder(folderspec)
设置FC = f文件
对于每一个F1在FC
S = S f1.name
S = 的|
下一个
showfilelist = S
其他的
showfilelist = - 1
最后如果
端功能
'!!!
文件复制
功能copyafile(源文件,destinationfile)
函数:存在源文件,复制文件,不影响文件。
参数:源文件、对象文件
''返回:成功是1,失败是- 1
昏暗的来
如果reportfilestatus(源文件)= 1
集来= fso.getfile(源文件)
文件中复制(destinationfile)。
copyafile = 1
其他的
copyafile = - 1
最后如果
端功能
文件移动
Response.Write MoveAFile(F: 123 4561 的文件。
功能moveafile(源文件,destinationfile)
函数:当文件的目的不存在以移动文件时,存在源文件。
参数:源文件、对象文件
''返回:成功是1,失败是- 1
如果reportfilestatus(源文件)= 1和reportfilestatus(destinationfileorpath)= =
1然后
Fso.MoveFile SourceFile,DestinationFileORPath
moveafile = 1
其他的
moveafile = - 1
最后如果
端功能
文件存在吗
response.write reportfilestatus(G:经常 my_pro Delphi代码库文件。)
功能reportfilestatus(文件名)
功能: / /找到
参数:文件名
''返回:成功是1,失败是- 1
昏暗的味精
MSG = 1
如果(fso.fileexists(文件名))然后
味精= 1
其他的
MSG = 1
最后如果
reportfilestatus =味精
端功能
文件创建日期
response.write showdatecreated(G:经常 my_pro Delphi代码库文件。)
response.write showdatecreated(G:经常 复杂my_pro Delphi代码库。exe)
功能showdatecreated(filespec)
函数:文件创建日期
参数:文件名
''返回:成功:未能创建文件日期:- 1
昏暗的F
如果reportfilestatus(filespec)= 1
集F = fso.getfile(filespec)
showdatecreated = f.datecreated
其他的
showdatecreated = - 1
最后如果
端功能
文件属性
Response.Write GetAttributes(G:经常 复杂my_pro Delphi代码库。exe)
功能getattributes(文件名)
函数:显示文件属性
参数:文件名
返回:成功:文件属性,失败:- 1
昏暗的F
如果reportfilestatus(文件名)= 1
集F = fso.getfile(文件名)
选择案例f.attributes
案例0普通文件。没有设置属性。
案例1只读文件可读写。
案例2隐藏文件可读写。
案例4系统文件可读写。
案例16文件夹或目录只读。
案例32=在上次备份后更改的文件。可读性和写入性。
案例1024链接或快捷方式。只读。
案例2048压缩文件。只读。
最后选择
getattributes = str
其他的
getattributes = - 1
最后如果
端功能
''上次访问/上次修改时间
Response.Write ShowFileAccessInfo(G:经常 复杂my_pro Delphi代码库。exe)
功能showfileaccessinfo(filename,信息类型)
函数:在创建文件时显示信息
参数:文件名、类别信息
1 -创建时间
2——最后一次访问时间
3,最后修改时间
4 -//文件路径
5文件名
6文件类型
文件大小为7
8 -/父目录
9根目录
返回:成功是在创建文件时失败的:- 1
暗淡的F
如果reportfilestatus(文件名)= 1
集F = fso.getfile(文件名)
选择信息类型
S = f.datecreated / / 1 - 1
创建时间
案例2 S = f.datelastaccessed / / 2 -最后的访问
时间
案例3 S = f.datelastmodified - 3 / /最后的修饰
时间
案例4 S = 4 f.path / /
——文件路径
案例5 S = 5 f.name / /
---文件的名称
案例6 S = 6 f.type / /
----文件类型
案例7 S = 7 f.size / /
——文件大小
S = f.parentfolder / / 8 - 8
父目录
S = f.rootfolder / / 8 - 9
根目录
最后选择
showfileaccessinfo = S
其他的
showfileaccessinfo = - 1
最后如果
端功能
写一个文本文件
Function WriteTxtFile (FileName, TextStr, WriteORAppendType)
Const ForReading = 1 = 2,写字,forappending = 8
亮度f
选择案例writeorappendtype
案例1:文件写操作
集F = fso.opentextfile(filename,写作,真的)
F.写textstr
F.关闭
如果reportfilestatus(文件名)= 1
writetxtfile = 1
其他的
writetxtfile = - 1
最后如果
在案例2的结尾写操作:文件
如果reportfilestatus(文件名)= 1
集F = fso.opentextfile(filename,forappending)
F.写textstr
F.关闭
writetxtfile = 1
其他的
writetxtfile = - 1
最后如果
最后选择
端功能
读取文本文件
功能readtxtfile(文件名)
Const ForReading = 1,= 2等
亮度f
如果reportfilestatus(文件名)= 1
集F = fso.opentextfile(文件名,ForReading)
M = f.readline
我= f.readall
f.skipline
readtxtfile = M
F.关闭
其他的
readtxtfile = - 1
最后如果
端功能
创建文本文件
/ / ==================================目录操作==================================
取目录大小
功能getfoldersize(相似的)
函数:目录大小
参数:目录名
''返回:成功的目录大小,失败是- 1
昏暗的F
如果reportfolderstatus(相似的)= 1
集F = fso.getfolder(相似的)
getfoldersize = F的大小
其他的
getfoldersize = - 1
最后如果
端功能
'创建文件夹
函数的CreateFolderDemo(相似的)
函数:创建文件夹
参数:目录名
''返回:成功是1,失败是- 1
昏暗的F
如果reportfolderstatus(folderspec)= 1
CreateFolderDemo = 1
其他的
集F = fso.createfolder(相似的)
createfolderdemo = 1
最后如果
端功能
'!!!
目录删除
函数的DeleteAFolder(folderspec)
函数:删除目录
参数:目录名
''返回:成功是1,失败是- 1
response.write folderspec
如果reportfolderstatus(folderspec)= 1
Fso.DeleteFolder(folderspec)
deleteafolder = 1
其他的
deleteafolder = - 1
最后如果
端功能
显示列表列表
功能showfolderlist(folderspec)
/ /功能:显示目录下所有子目录下,这个目录存在
参数:目录名
/ /返回:一列目录,失败是1
F,f1,FC,s
如果reportfolderstatus(folderspec)= 1
集F = fso.getfolder(folderspec)
集f.subfolders FC =
对于每一个F1在FC
S = S f1.name
S = 的|
下一个
showfolderlist = S
其他的
showfolderlist = - 1
最后如果
端功能
'!!!!
目录复制
功能copyafolder(sourcefolder,destinationfolder)
函数:源目录存在于目录复制,而不影响目标目录。
参数:目录中的源目录
''返回:成功是1,失败是- 1
'dim myfolder
如果reportfolderstatus(sourcefolder)= 1和reportfolderstatus
(destinationfolder)- 1 =然后
让myfolder = fso.getfolder(sourcefolder)
Fso.CopyFolder SourceFolder,destinationfolder
copyafolder = 1
'else
copyafolder = - 1
如果
端功能
目录被移动
功能moveafolder(SourcePath,destinationpath)
函数:源目录存在时,目的地目录不存在,无法移动到目录。
参数:目录中的源目录
''返回:成功是1,失败是- 1
如果reportfolderstatus(sourcepath)= 1和reportfolderstatus(destinationpath)= 0
然后
Fso.MoveFolder SourcePath,DestinationPath
moveafolder = 1
其他的
moveafolder = - 1
最后如果
端功能
确定目录的存在
response.write reportfolderstatus(G:经常 my_pro Delphi )
功能reportfolderstatus(科学)
功能: / /判断目录是否存在
参数:目录
''返回:成功是1,失败是- 1
昏暗的味精
MSG = 1
如果(fso.folderexists(FLDR))然后
味精= 1
其他的
MSG = 1
最后如果
reportfolderstatus =味精
端功能
目录创建信息
showfolderaccessinfo(相似的功能,信息类型)
函数:显示目录信息
参数:目录名、类别信息
1 -创建时间
2——最后一次访问时间
3,最后修改时间
4 -目录路径
5目录名
6目录类型
7目录大小
8 -/父目录
9根目录
返回:成功的目录创建信息失败:- 1
暗淡的F
如果reportfolderstatus(相似的)= 1
集F = fso.getfolder(相似的)
选择信息类型
S = f.datecreated / / 1 - 1
创建时间
案例2 S = f.datelastaccessed / / 2 -最后的访问
时间
案例3 S = f.datelastmodified - 3 / /最后的修饰
时间
案例4 S = 4 f.path / /
——文件路径
案例5 S = 5 f.name / /
---文件的名称
案例6 S = 6 f.type / /
----文件类型
案例7 S = 7 f.size / /
——文件大小
S = f.parentfolder / / 8 - 8
父目录
S = f.rootfolder / / 9 - 9
根目录
最后选择
showfolderaccessinfo = S
其他的
showfolderaccessinfo = - 1
最后如果
端功能
功能displayleveldepth(pathspec)
暗淡的F,N,Path
集F = fso.getfolder(pathspec)
如果f.isrootfolder然后
displayleveldepth =指定文件夹的根文件夹。RootFolder
其他的
直到f.isrootfolder做
路径=路径f.name
集F = f.parentfolder
n=n+1
环
displayleveldepth = 指定的文件夹是一个嵌套级别的N文件夹。
路径
最后如果
端功能
/ / ==================================磁盘操作==================================
驱动器存在吗
response.write reportdrivestatus(C:)
功能reportdrivestatus(DRV)
函数:确定是否有磁盘
参数:磁盘
''返回:成功是1,失败是- 1
昏暗的味精
MSG = 1
如果fso.driveexists(DRV)然后
味精= 1
其他的
MSG = 1
最后如果
reportdrivestatus =味精
端功能
--------可返回类型包括脂肪、NTFS和CDFS。
Response.Write ShowFileSystemType(C:)
功能showfilesystemtype(drvspec)
函数:磁盘类型
参数:磁盘名
/ /返回:成功的类型:脂肪,NTFS和CDFS,失败:1
昏暗的D
如果reportdrivestatus(drvspec)= 1
设置d = FSO。getdrive(drvspec)
showfilesystemtype = d.filesystem
其他的
showfilesystemtype = - 1
最后如果
端功能
类的结束
%>
声明:本文内容用于数码产品信息整理与选购参考,具体价格、库存、售后政策以官方渠道和电商页面实时信息为准。