Elon's Blog

Stuff that may be of use to someone…

Archive for the ‘Microsoft Related’ Category

General Microsoft Product and News related Articles

Move \ Copy Files with Date and timestamps using DOS commands

Posted by Elon B. on September 2, 2012

You can use DOS commands , possibly in a batch file (.bat)  if you want, to copy files from one location to another, adding a DATE or TIME stamp to the file name.

Open up a DOS\Command prompt window.

We can see the results of using the ECHO cammand to display the current date and time, as follows.

DOS Date and Time commands

We can then use this in our Dos COPY command as follows. [  copy *.txt *_%date:/=%_.txt  ]

Don’t forget you can use wildcards for the filenames as normal.

Copy adding DATE to filename

Copy with Date and Timestamp  [  copy *.txt *_%date:/=%_%TIME::=%.txt /Y ]

Add DATE and TIME to filename

Hope you find this useful.

Advertisement

Posted in Microsoft Related, SSIS, Windows 7, Windows Office - General | Tagged: , , , , | Leave a Comment »

What’s keeping your computer from going to sleep

Posted by Elon B. on July 8, 2012

You can run the following command from the Command Prompt (Start > Programs > Accessories, right-click on Command Prompt, and open it as an administrator)  Then type

powercfg -requests

This works on most Windows OS.

You can check out the command options here on technet

Try it an see what’s keeping your PC from going to sleep.

Posted in Microsoft Related, Windows 7 | 1 Comment »

 
%d bloggers like this: