这两天因为在海外想看土豆视频,使用ip隐藏软件访问了的。无意中发现只要使用隐藏ip方式,文件传输速度变得很快。
옛날 노랜데...
둥근 달님이 떠오르면
어머님 얼굴 보고싶소
밝은 별빛이 반짝이면
어머님 말씀 듣고싶소
세월이 흘러 흘러서
이 몸은 자랐어도
어머님 무릎아래서
자장가 듣고싶소.
'move folder to destination as subfolder
call objFSO.moveFolder("C:\macro\aa", "C:\macro\aaa\")
@rd /s/q bin
@pause
@del deleteFolder.bat
----
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objWshShell = WScript.CreateObject("WScript.Shell")
'Get Current Directory path
Set objFolder = objFSO.GetFolder(objWshShell.CurrentDirectory)
GetFile objFolder
Sub GetFile(colSubfolders)
'Delete the subfolder named cvs
' Set colSubfolders = colSubfolders.Subfolders
For Each objSubfolder in colSubfolders.Subfolders
If objSubfolder.Name="CVS" or objSubfolder.Name=".metadata" then
Wscript.Echo objSubfolder.Path
objFSO.DeleteFolder(objSubfolder)
i=i+1
Else
'Wscript.Echo objSubfolder.Name
GetFile objSubfolder
End If
Next
End Sub
Wscript.Echo i & "件のCVSファイルを削除しました。"
明天或许有用,先贴上。
Sub Macro()
Dim FSO, fold, i As Integer
Set FSO = CreateObject("Scripting.FileSystemObject")
Set fold = FSO.GetFolder("D:\study")
i = 1
For Each myFile In fold.SubFolders
If StrConv(Right(myFile.Name, 4), vbLowerCase) = ".pdf" Then
'Workbooks.Open Filename:=myFile.Path
Sheets(1).Cells(i, 1) = myFile.Path
i = i + 1
End If
Next
Set FSO = Nothing
End Sub
Sub Test()
Dim FoundFile As String, i As Integer
i = 1
'FoundFile = Dir(ThisWorkbook.Path & "\*.xls")
FoundFile = Dir("D:\study\C++\*.pdf")
Do While FoundFile <> ""
If FoundFile = "." Then
Debug.Print FoundFile
End If
Sheets(1).Cells(i, 1) = FoundFile
FoundFile = Dir()
i = i + 1
Loop
End Sub
Sub Test1()
EnumFiles "d:\study\c++" ' 遍历指定目录下的文件
End Sub
Sub EnumFiles(ByVal sPath As String)
Dim fs As New FileSystemObject
GetFile fs.GetFolder(sPath)
Set fs = Nothing
End Sub
Sub GetFile(ByVal fldParent As Folder)
Dim fldSub As Folder, fSub As File
For Each fldSub In fldParent.SubFolders
GetFile fldSub
Next
For Each fSub In fldParent.Files
If UCase(Right(Trim(fSub), 3)) = "PDF" Then ' 文件类型判断
Debug.Print fSub
End If
Next
Set fldSub = Nothing
Set fSub = Nothing
End Sub
