r/techsupport•
Dinierto

Need help creating a simple batch file in Windows

Open

I have zero knowledge of batch file commands. I tried googling my issue but didn't have much luck applying the results to my situation.

Basically I want to make a text file in a bunch of directories, and inside the text file would be the file names of the contents. The text file would then be named by the name of the folder its in.

So if I have a folder called Documents, and inside were doc1.doc and doc2.doc, the file would create a text file inside Documents, called Documents.txt and inside that file would be doc1.doc and doc2.doc each on their own line. I have a bunch of directories I need this done on. Is there anyone here who might be able to help me? Also is there another sub I should check in, I wasn't sure if this was the right place.

Posted Jun 4, 2020, 11:36 PM UTC

14
Loading comments…