troubleshooting Question

Batch file to list filenames, ignoring the duplicates

Avatar of mkhan900
mkhan900 asked on
Microsoft DOSWindows Batch
16 Comments1 Solution253 ViewsLast Modified:
Need some expert's help with this. I need the path of all the files saved to a text file.
I know it is as simple as

Dir H:\folder /a-d /b /s | find /i ".dat" >> output.txt

But my problem arises with duplicates. A file can have a multiple instances I need only the first occurance ECHOed in the output file.

Thanks in advance.
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 16 Comments.
Join the Community
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 1 Answer and 16 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