sunshine076
Registered User.
- Local time
- Today, 09:25
- Joined
- Apr 6, 2009
- Messages
- 160
Below is a copy of my code so far, I would like to make sure that I am on the right track. What I am doing is checking in one directory for any .txt file that has been last modified by about a few days and move those files to a different direcotry using vbs 2008. My other thought is use a checkbox and if it is marked and the archive button has been clicked it will move the file.
Dim objFSO, objFileCopy, objGuyFile
Dim strFilePath, strDestination
strFilePath = "Y:\Quality\HotButton\Leader Comm"
strDestination ="Y:\Quality\HotButton\archive"
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objGuyFile = objFSO.CreateTextFile(strFilePath, True)
WSCript.Echo "Written " & strFileText & " to " & strFilePath
Set objFileCopy = objFSO.GetFile(strFilePath)
' Copy the file to its destination
objFileCopy.Copy (strDestination)
WSCript.Echo "Copied to " & strDestination
Wscript.Quit
Dim objFSO, objFileCopy, objGuyFile
Dim strFilePath, strDestination
strFilePath = "Y:\Quality\HotButton\Leader Comm"
strDestination ="Y:\Quality\HotButton\archive"
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objGuyFile = objFSO.CreateTextFile(strFilePath, True)
WSCript.Echo "Written " & strFileText & " to " & strFilePath
Set objFileCopy = objFSO.GetFile(strFilePath)
' Copy the file to its destination
objFileCopy.Copy (strDestination)
WSCript.Echo "Copied to " & strDestination
Wscript.Quit