Script to delete files after a set number
Hello to all. I am trying to create a script that will delete files in a folder after the file count reaches a specific number, say, 7.
This is what I have written:
Set fso = CreateObject("Scripting.FileSystemObject")
If srcFolder.Files.Count > 7 Then
I know it is wrong as it returns error messages. Could someone help me with this script? Also, could you recommend a good book or website which would helpd me going forward?