0

So I'm trying to make a Windows batch file that will open the file dialog and allow me to select multiple files that will echo the file names to a txt file. I did some research and manged to find part of the answer here

link to the answer

However that only allows me to select one file at a time. a user in the comments was able to make it select multiple files however there is no info on how. thanks for your time and hope you can help.

Community
  • 1
  • 1

1 Answers1

0

Refer to MultiSelect.

>>"%temp%\c.cs" echo class dummy{
>>"%temp%\c.cs" echo public static void Main^(^){
>>"%temp%\c.cs" echo OpenFileDialog f=new OpenFileDialog^(^);
>>"%temp%\c.cs" echo f.InitialDirectory=Environment.CurrentDirectory;
>>"%temp%\c.cs" echo f.Filter="Text Files (*.txt)|*.txt|All Files (*.*)|*.*";
>>"%temp%\c.cs" echo f.Multiselect = true;
>>"%temp%\c.cs" echo f.ShowHelp=true;
>>"%temp%\c.cs" echo f.ShowDialog^(^);
>>"%temp%\c.cs" echo foreach^(var filename in f.FileNames^)
>>"%temp%\c.cs" echo Console.Write^(filename^ + "\t");}}

Not sure how you want to use it, but just modify the code to do what you wish with the output.