View from Trafalgar Square – posted with @Pressgram
London Impressions
Windsor Calling
Avett Brothers in Concert
I have to copy over a file from the corporate network to my windows laptop on a regular basis. Being in the field, I don’t have a network connection very often. Hence, I opted against a scheduled task and went with a good old .bat file instead. This file sits on my desktop and everytime I log on to the network via VPN I click on that batch file. To keep a history of the files I wanted the current date in the file name. Here it goes:
@echo off
SET DAY=%DATE:~0,2%
SET MONTH=%DATE:~3,2%
SET YEAR=%DATE:~6,4%
SET MYDATE=%YEAR%-%MONTH%-%DAY%
cd “C:\Documents and Settings\USER\My Documents\”copy “F:\SRCDIRECTORY\FILENAME.EXT” “%MYDATE% NEW FILENAME.EXT” /Y
You would have to replace USER, SRCDIRECTORY, FILENAME.EXT, and NEW FILENAME.EXT with the respective values for your needs. How would you have solved that? Feel free to leave me a comment.