troubleshooting Question

cmd scripting using the dir command to get desired results

Avatar of franable
franable asked on
Windows Batch
7 Comments2 Solutions278 ViewsLast Modified:
Hello,

I'm using Windows 7 as the operating system. I would like to use a standard batch script for the solution if possible, not powershell or vbs.

I'm not sure what switch to use to only get a readout of the files with the "dir" command in the directory including the size & date.

the /B following the dir command lists how I want it to look but there is no size & date following the file names. Please see the 2 examples below.

I have tried several combination of switches and I'm having problems. Can you help
Thanks

C:\Users\testuser\Desktop\testjunk>dir

 Volume in drive C has no label.
 Volume Serial Number is WXYZ-7F9B

 Directory of C:\Users\testuser\Desktop\testjunk

05/16/2014  09:08 AM    <DIR>          .
05/16/2014  09:08 AM    <DIR>          ..
05/16/2014  09:06 AM             4,848 inst1.txt
05/16/2014  09:07 AM             1,212 inst2.txt
05/16/2014  09:07 AM            25,494 inst3.txt
               3 File(s)         31,734 bytes
               2 Dir(s)   8,256,966,656 bytes free


C:\Users\testuser\Desktop\testjunk>dir /B
inst1.txt
inst2.txt
inst3.txt
ASKER CERTIFIED SOLUTION
Join our community to see this answer!
Unlock 2 Answers and 7 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 2 Answers and 7 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros