青州论坛

  • 0536-3291910
  • 举报邮箱:9626482@qq.com
搜索
猜你喜欢
查看: 2137|回复: 0

[电脑问题] flex入门教程中的基础知识内容

[复制链接]

2

主题

0

回帖

2

积分

列兵

积分
2
发表于 2013-11-29 16:44:08 | 显示全部楼层 |阅读模式
flex入门教程当中都是一些比较简单的flex入门教程知识内容。我们在学习以及掌握它的核心知识内容的时候只要是能够注意从基础开始学起,自己能够掌握好其核心的知识信息,那么在学习flex入门教程的时候其实就会简单容易很多了。现在,我们就来看看flex入门教程中的一些最为基础的知识内容。
Function DelFile(FilePath)
On Error Resume Next
Dim fso,arrFile,i

IfGetSafeStr(FilePath,"")="" then
CreateFolder = false
End If

arrFile = Split(FilePath,"|")
Set Fso =Server.CreateObject("Scripting.FileSystemObject")

for i=0 to UBound(arrFile)
FilePath = arrFile(i)
If Fso.FileExists(Server.MapPath(FilePath)) then
Fso.DeleteFile Server.MapPath(FilePath)
End If
If Fso.folderexists(Server.MapPath(FilePath))then
Fso.deleteFolder Server.MapPath(FilePath)
End If
Next
Set fso = nothing

If Err then
Err.clear()
DelFile = false
'ShowError "删除文件或目录失败",""
else
DelFile = true
End If
End Function
'函数名:ReNameFile((oldName,newName)
'作 用: 重命名文件或目录
'参 数:strOldName '原文件名 多个用"|"隔开
' strNewName '新文件名 多个用"|"隔开
' 上面两个参数请保持一致
'返回值:成功 true , 失败 false
Function ReNameFile(strOldName,strNewName)
On Error Resume Next
Dim fso,arrOld,arrNew,i,oldName,newName

old = GetSafeStr(strOldName,"")
Newfile = GetSafeStr(strNewName,"")

If old ="" or Newfile = ""then
ReNameFile = false
Exit Function
End If

arrOld = Split(strOldName,"|")
arrNew = Split(strNewName,"|")

If UBound(arrOld)<> UBound(arrNew) then
ReNameFile = false
Exit Function
End If

Set Fso =Server.CreateObject("Scripting.FileSystemObject")
for i=0 to UBound(arrOld)
oldName = Server.MapPath(arrOld(i))
newName = Server.MapPath(arrNew(i))
If Fso.FileExists(oldName) and notFso.FileExists(newName) then
fso.MoveFile oldName,newName
'ReNameFile = True
End If
Next
Set fso = nothing

If Err.Number <> 0 Then
Err.clear()
ReNameFile = false
Else
ReNameFile = True
End If
End Function
'函数名:CopyFiles((TempSource,TempEnd)
'作 用: 复制文件或者目录
'参 数:TempSource '源文件名 多个用"|"隔开
' TempEnd '目的文件名 多个用"|"隔开
' 注意:上面两个参数请保持一致,并且都为完整路径,
' 已经经过Server.MapPath方法处理过
'返回值:成功 true , 失败 false
flex入门教程中的基础知识内容不仅只是这些,具体的专业学习还需要大家自己在学习掌握flex的时候能够多看看flex入门教程书籍以及相关的专业知识信息,从而能够帮助自己掌握更多的flex专业知识信息。
回复

使用道具 举报

使用 高级模式(可批量传图、插入视频等)
您需要登录后才可以回帖 登录 | 立即注册

快速回复 返回顶部 返回列表