Login | |
|
 |
RE: Checking for patterns in files & Moving them into f... - 1/15/2008 5:07:34 PM
|
|
 |
|
| |
dm_4ever
Posts: 2641
Score: 46
Joined: 6/29/2006
From: Orange County, California
Status: offline
|
Since you know there maybe some folders that don't match your criteria.... sFileName = "H:\Test\" & "*" & "2008-01-01" & "*" & ".log" sDirectoryName = "H:\Test\Archive\Archiveyyyy-mm-dd" On Error Resume Next objFile.MoveFile sFileName, sDirectoryName On Error Goto 0 You could also loop through all the files checking to see if there is at least one file that matches your pattern, but that may be more work than its worth.
_____________________________
dm_4ever My philosophy: K.I.S.S - Keep It Simple Stupid Read Me: http://www.visualbasicscript.com/m_24727/tm.htm Frequently Asked Stuff: http://www.visualbasicscript.com/m_47117/tm.htm
|
|
| |
|
|
|
|
|