Hey Guru's,
Please some one lead me,how to count files in two folder using time frame.
I know count files in the folder is simple,i trying to count files like
1st run from 9Am to 12 PM
2nd run from 12Pm to 3 PM.
Like this.
***********************************************************
Dim oFS, SourceFolder,DestFolder,Source,Dest,demofolder,foldername
set oFS =CreateObject("Scripting.FileSystemObject")
set SourceFolder = oFS.GetFolder("c:\sourcefolder")
Set DestFolder=oFS.GetFolder("c:\destfolder")
'Set demofolder=oFS.GetFolder("c:\destfolder")
Set demofolder=oFS.GetFile("c:\destfolder\")
foldername=demofolder.Name
WScript.Echo foldername
Source= SourceFolder.Files.Count
Dest= DestFolder.Files.Count
ShowsourceFolderDetails SourceFolder
ShowdestFolderDetails DestFolder
If Source=Dest Then
WScript.Echo "SYNC"
Else
WScript.Echo "NON SYNC"
End if
sub ShowsourceFolderDetails(SourceFolder)
dim F
wscript.echo SourceFolder.Name & ":Size=" & SourceFolder.Size
wscript.echo SourceFolder.Name & ":#Files=" & SourceFolder.Files.Count
wscript.echo SourceFolder.Name & ":#Folders=" & SourceFolder.Subfolders.count
wscript.echo SourceFolder.Name & ":Size=" & SourceFolder.Size
F=SourceFolder.Files.Count
'for each F in SourceFolder.Subfolders
' ShowsourceFolderDetails(F)
'next
end Sub
Sub ShowdestFolderDetails(DestFolder)
Dim D
WScript.Echo "DEST COUNT" & DestFolder.Files.Count
D=DestFolder.Files.Count
End sub
********************************************************
Pleas help me to add a time frame in this logic.
Thanks in Advance
EHVBS
Please some one lead me,how to count files in two folder using time frame.
I know count files in the folder is simple,i trying to count files like
1st run from 9Am to 12 PM
2nd run from 12Pm to 3 PM.
Like this.
***********************************************************
Dim oFS, SourceFolder,DestFolder,Source,Dest,demofolder,foldername
set oFS =CreateObject("Scripting.FileSystemObject")
set SourceFolder = oFS.GetFolder("c:\sourcefolder")
Set DestFolder=oFS.GetFolder("c:\destfolder")
'Set demofolder=oFS.GetFolder("c:\destfolder")
Set demofolder=oFS.GetFile("c:\destfolder\")
foldername=demofolder.Name
WScript.Echo foldername
Source= SourceFolder.Files.Count
Dest= DestFolder.Files.Count
ShowsourceFolderDetails SourceFolder
ShowdestFolderDetails DestFolder
If Source=Dest Then
WScript.Echo "SYNC"
Else
WScript.Echo "NON SYNC"
End if
sub ShowsourceFolderDetails(SourceFolder)
dim F
wscript.echo SourceFolder.Name & ":Size=" & SourceFolder.Size
wscript.echo SourceFolder.Name & ":#Files=" & SourceFolder.Files.Count
wscript.echo SourceFolder.Name & ":#Folders=" & SourceFolder.Subfolders.count
wscript.echo SourceFolder.Name & ":Size=" & SourceFolder.Size
F=SourceFolder.Files.Count
'for each F in SourceFolder.Subfolders
' ShowsourceFolderDetails(F)
'next
end Sub
Sub ShowdestFolderDetails(DestFolder)
Dim D
WScript.Echo "DEST COUNT" & DestFolder.Files.Count
D=DestFolder.Files.Count
End sub
********************************************************
Pleas help me to add a time frame in this logic.
Thanks in Advance
EHVBS