Directory Listing to Filename based on date

G

Guest

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.
 
P

Pegasus \(MVP\)

Ronald_L said:
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.

Try this:

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

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top