User1795084881 posted
Dear all, I am facing some problem, as I not familiar with vbs.
My problem: By using the script below, I able to successfully move the whole simon14 folder into c:/testing/simon14
However, what I want is to move all the FILES n FOLDERS INSIDE simon14 to C:/testing.
It means I don't want to include this simon14 by itself.
Help...
Dim objFSO
Set objFSO = CreateObject("Scripting.FileSystemObject")
strSource = "C:/simon14/"
If Right(strSource, 1) = "/" Then strSource = Left(strSource, Len(strSource) - 1)
strDest = "C:/testing/"
If Right(strDest, 1) <> "/" Then strDest = strDest & "/"
If objFSO.FolderExists(strDest) = False Then
objFSO.CreateFolder strDest
End If
If objFSO.FolderExists(strSource) Then
objFSO.CopyFolder strSource, strDest, True
'objFSO.DeleteFolder strSource, True
End If
Set objFSO = Nothing