All posts by frank

VB Script to Delete Files In a Certain Path Having a Certain Extension

https://social.technet.microsoft.com/Forums/scriptcenter/en-US/6d5fb3f5-b553-42ee-8a2d-b86e1c582ad8/vb-script-to-delete-files-of-a-certain-extension

DOWNLOAD ZIP FILE ATTACHED CONTAINING VBS FILE FOR USE ON WINDOWS

Note:  The download file is based on the Technet Script shown below, except that the Echo Confirm Deletion line has been commented-out.  This is a good way to selectively delete those rogue .htaccess files that have been injected into every sub-folder of your website.  Make sure you test this script on a PC on which it will not matter if you happen to mistakenly delete the entire system. USE AT YOUR OWN RISK. BE VERY CAREFUL.  IF YOU DON’T UNDERSTAND THE CODE IN THE SCRIPT, THEN DON’T RUN IT.

OPTION EXPLICIT
DIM strExtensionsToDelete,strFolder
DIM objFSO, MaxAge, IncludeSubFolders

‘ ************************************************************
‘ Setup
‘ ************************************************************

‘ Folder to delete files
strFolder = “D:\test”
‘ Delete files from sub-folders?
includeSubfolders = true
‘ A comma separated list of file extensions
‘ Files with extensions provided in the list below will be deleted
strExtensionsToDelete = “log”
‘ Max File Age (in Days). Files older than this will be deleted.
maxAge = 10

‘ ************************************************************

set objFSO = createobject(“Scripting.FileSystemObject”)

DeleteFiles strFolder,strExtensionsToDelete, maxAge, includeSubFolders

wscript.echo “Finished”

sub DeleteFiles(byval strDirectory,byval strExtensionsToDelete,byval maxAge,includeSubFolders)
DIM objFolder, objSubFolder, objFile
DIM strExt

set objFolder = objFSO.GetFolder(strDirectory)
for each objFile in objFolder.Files
for each strExt in SPLIT(UCASE(strExtensionsToDelete),”,”)
if RIGHT(UCASE(objFile.Path),LEN(strExt)+1) = “.” & strExt then
IF objFile.DateLastModified < (Now – MaxAge) THEN
wscript.echo “Deleting:” & objFile.Path & ” | ” & objFile.DateLastModified
objFile.Delete
exit for
END IF
end if
next
next
if includeSubFolders = true then ‘ Recursive delete
for each objSubFolder in objFolder.SubFolders
DeleteFiles objSubFolder.Path,strExtensionsToDelete,maxAge, includeSubFolders
next
end if
end sub

Bread Recipe

wpid-20150701_085659.jpg

  • 1 Cup Warm – Hot (Tepid) Water
  • 1 Package Fleishman’s Dry Active Yeast
  • 1/2 Teaspoon Sugar
  • 2 Tablespoons of melted real butter
  • 1 Teaspoon Salt
  • 2 1/2 Cups of All Purpose Unbleached Flour
  • Olive Oil

In a large bowl, empty package of dry yeast and 1/2 teaspoon of sugar.  Add 1 Cup hot tap water.  Stir to dissolve the yeast.  Cover the bowl loosely with plastic wrap and let sit for 10 to 15 minutes to allow yeast to foam and activate.

Add 2 1/2 cups of flour and 2 tablespoons melted butter.  Stir the mixture with a fork until it forms a loose ball of dough. Remove and hand knead (turn out the dough) for about 3 or 4 minutes until smooth but slightly sticky.  Form into a dough ball.

Wash the bowl and towel dry it.  Add a small amount of olive oil to lightly grease the entire interior of the bowl.  Place the dough ball in the bowl and briefly roll it around inside the bowl to lightly grease the surface of the dough.  Cover the bowl loosely with the plastic wrap and a dry dish towel on top, and let the dough rise for 1 or 2 hours, or until doubled in size.

Preheat an oven to 450 F.

Punch down the dough and knead it again for 3 or 4 minutes.  Place the dough in a butter greased or olive oil greased 8 x 4″ or 9 x 5″ metal bread baking pan and lightly press and spread the dough level and into the corners of the baking pan.  Lightly coat the surface of the bread with some olive oil.  Score the bread one or two quick swipes with a sharp knife.

Place the baking pan and dough on the middle over rack and bake at 450 F. for 15 minutes.  (Do not open the over door for the first 30 minutes of baking).  Then, after the first 15 minutes of baking,  lower the oven heat to 350 F. and continue to bake for another 25 to 35 minutes.  The bread is finished baking when the top of the bread is a golden brown.

Remove  the baking pan and bread, and allow to sit and cool for 10 minutes.  Carefully remove the bread from the baking pan so that the bread will not become soggy, and place the loaf on a cooling rack.

Slice and serve warm or cool with real butter.  Enjoy!

wpid-20150701_094759.jpg

Fix Email Dates in Gmail IMAP After Importing Email into Thunderbird

When Nokia Mail powered by Yahoo was discontinued, I used the Import-Export-Tools Extension of Mozilla Thunderbird in order to export and thereby backup email messages (EML files) from each Thunderbird folder that was previously connected to Nokia email (mail.ovi.com).

I setup a new gmail account and created a new profile using Thunderbird desktop client to connect to gmail via IMAP protocol.  All online folders were then subscribed through Thunderbird.

Using Import-Export Tools in Thunderbird, I imported the back-up email files into my “local folders” in Thunderbird: Inbox, Sent, Drafts, Important, etc.  Then, I selected all those imported files from a particular local folder in Thunderbird (such as the Inbox), and I marked all selected files as being ‘unread’ (i.e. bolded them), and then copied them to the appropriate target IMAP gmail folder within Thunderbird.

 Thunderbird began uploading / synchronizing the email from the Inbox.  I logged into the webmail interface of Gmail and discovered that many of the newly uploaded Inbox files were displaying the current date rather than the correct historical date received.  I marked all uploaded files as having been ‘read’ and then re-marked and bolded only those files with the incorrect received dates being displayed.  I copied these unread / bolded files into a temporary folder that I created in my Thunderbird “local folders.”   IMPORTANT:  I then used the web interface of Gmail to delete all the bolded messages in the Inbox.  Further, I emptied the Trash folder on the Gmail Web Interface — permanently deleted the bolded messages — those containing the current date as a timestamp rather than the actual date received.  Then, within Thunderbird, I copied the still-bolded messages from the Temporary Local folder and pasted them into the IMAP Inbox folder.  Voila!!! The dates received are now displayed.  It just takes a little coaxing.

Repeat this process for Sent Mail, Drafts, and Important folders in Gmail via Thunderbird using IMAP.

Thunderbird Client Accessing Verizon Email Keeps Asking for Password (Solved)

If your Thunderbird or Outlook client stopped working with Verizon email accounts, then this may be why.

  • You can no longer use:
    incoming.verizon.net (incoming Pop server)
    outgoing.verizon.net (outgoing SMTP server)
  • You must now use:
    pop.verizon.net (incoming Pop server)
    smtp.verizon.net (outgoing SMTP server)

Here is the article from Verizon Support:

Please Note: Verizon has recently updated our email client settings to improve security. Please review the settings below to verify that your email software client (e.g. Outlook, Outlook Express, etc.) has the most recent configuration.

Before you begin:
You’ll need the following email settings:
Incoming mail server (POP3): pop.verizon.net
Incoming Server Port Numbers: 995
Outgoing mail server (SMTP): smtp.verizon.net
Outgoing Server Port Numbers: 465 Why is this important?
Make sure SSL encryption is enabled for the incoming and outgoing mail server.
For more email and remote access configuration options see Verizon Online Email Settings

 

P.S.  If you are using Avast Antivirus (which will scan encrypted email messages), then after you change your server names in Thunderbird, you will need to confirm a security exception for POP and SMTP server names in Thunderbird (for the avast scanner proxies to work properly) and also at some point re-enter your valid password and check the box to save and manage your password with the Thunderbird password manager.