|
|
读取目录下的所有文件(包括子目录下的所有文件)
发布时间:2006-11-11 15:56:15 点击:
 |
绿叶OA王办公软件演示 |
|
在线体验:http://www.oa169.com
绿叶oa系统包含通知、短消息、邮件、文件收发、公文流转、共享下载、工作日程、工作日志、工作周报、工作总结、个人计划、新闻发布、教学动态(学校版)、工作日志、企业论坛、制度管理、资产管理、在线考勤、通讯录、会议管理等等。同时包含强大的文字、动画、语音提示系统。
Many times we might need some part of code which will access all sub-folders of the server and also all files within the sub-folder. The following line of asp code will map to a specified folder and searches all the sub-folders (Not recursively, code can be extended to do) and reads all files(basically text files) one by one.
You can specify any folder name, in the remarks given in the code (within " ")
'Create a File system Object set FileSystem=server.CreateObject("scripting.filesystemobject")
dim dbconn
folderpath=server.MapPath("main Folder path" ) set sfolder=Filesystem.GetFolder(folderpath).SubFolders for each FolderItem in sfolder set Files=FolderItem.Files for each FileItem in Files fname=server.MapPath( "main folder path" & FolderItem.Name & "\" & FileItem.Name set File=FileSystem.OpenTextFile(fname,1,false) while File.AtEndofStream <> True record=split(File.Readline,"~") wend File.close FileSystem.DeleteFile(fname) next next
******************************
|
OA关键词:读取目录下的所有文件(包括子目录下的所有文件),asp,asp代码,oa源代码 OA OA办公系统 OA系统 OA办公软件 办公自动化 无纸化办公 协同办公系统
OA信息: [1][2][3][4][5][6][7][8][9][10][11][12][13][14][15][16][17][18][19][20][21][22][23]更多>>
( 后续页1 后续页2 后续页3)
|