How to rename file names in Windows using a pattern

Occasionally you need to rename a heap of photos or mp3 files or movies, in order to use it with something different — mp3 player or e-reader or something, storing just parts of their names, such a chapter or track numbers. Here’s a simple vbs script to help you — just copy it to a notepad, set appropriate settings, save it to a file with «.vbs» extension, such a «test.vbs» and double-click it. That’s all.

 

How to find all files in a current directory created less than N minuts (hours/days/years) ago using VBS & WMI

Very simple!

All you need is to change some of the options in the head of the script:

 

 

Prevent windows session from logout

Well, if you can’t change your logout setting due to some reasons (such as a nasty sysadmin), you can use easy vbs script. So:

  • Create a new file
  • Put into it the text below:

  • Call it somethin.vbs and save it somewhere;
  • Double click on it;
  • Enjoy.

This script emulates you, who presses scroll key twice once a minute .

How to Click «OK» when a win popup disturbs you

There was a little problem at my work, when some popup windows were needed to be closed to continue work, but some people forgot to press them. So here’s a little trick:

 

copy this text to a file with «.vbs» extension, end then double-click on it. Don’t forget to provide the correct window title!

Script will work in background, and check if a window with the needed title is appeared. If it is, it’ll send the ENTER signal.

You can change  WScript.Sleep 500 to another value, for example, if you set  WScript.Sleep 1000 script will send OK in a second. You can also change  WScript.Sleep 30000 to another value, therefore script will check new windows not every 30 seconds, but the necessary period.