Tech Support > Microsoft Windows > Directory Listing to Filename based on date
Directory Listing to Filename based on date
Posted by Ronald_L on April 5th, 2006


I need a batch or vbscript that will list the contents of a directory to a
text file and save the file based on the current date. Can anyone help.

Posted by Pegasus \(MVP\) on April 5th, 2006



"Ronald_L" <RonaldL@discussions.microsoft.com> wrote in message
news:3D787A3C-A45A-4761-92E2-077D8DAAC93D@microsoft.com...
Try this:

@echo off
dir /on > "c:\%date:/=-%.txt"




Similar Posts