冷冷的,我是新來的,希望你能幫上忙。 我是系統工程師,必須移動(複製)400個目錄中的500個文件夾。 文件夾名稱uniek GUID {f199a57f-fbee-411B-a70e-32619f87e6aa}命名將特定文件夾複製到新位置
是否有VB或者C#的方式來讓用戶輸入需要被COPYD文件夾的400名,讓紙條搜索他們並將文件夾複製到新位置?
謝謝您的幫助...
的問候,維姆
笏我想:
我想這一點,但注意到hapens :-(
Sub CopySomeFolder()
Dim FSO, sourceFolder, currentFile, filesInSourceFolder
Dim strSourceFolderPath
Dim strDestinationFolderPath
Dim strUserInput
Set FSO = CreateObject("Scripting.FileSystemObject")
' Figure out which folder to copy from where to where
strUserInput = InputBox("Please enter name of file to copy.")
strSourceFolderPath = "M:\"
strDestinationFolderPath = "M:\"
Set sourceFolder = FSO.GetFolder(strSourceFolderPath)
Set filesInSourceFolder = sourceFolder.Files
' Look at all folders in source folder. If name matches,
' copy to destination folder.
For Each currentFile In filesInSourceFolder
If currentFile.Name = strUserInput Then
currentFile.Copy (FSO.BuildPath(strDestinationFolderPath, _
currentFile.Name))
End If
Next
End Sub
有可能是,但請告訴我們你已經嘗試過。 – pascalhein
我試過這個,但注意到ha :-( – QuinCo
請顯示一些代碼,所以我們可以找到它的問題 – pascalhein