How to use vbs to traverse files and display them randomly
This article mainly introduces how to use vbs to traverse files and display them randomly. The introduction in this article is very detailed and has a certain reference value. Interested friends must finish reading it!
Set ws=createobject ("wscript.shell") set fso=createobject ("scripting.filesystemobject") set folder=fso.getfolder (ws.currentdirectory) set files=folder.files for each file in files dudes & file.name & "," next Randomize Do Until D = "" s = Split (D, ",") M = UBound (s) h = Int (Rnd * M) N = s (h) sn = sn & N & vbcr D = Replace (D, N & ",", "" 1) the above Loop MsgBox sn is all the contents of the article "how to use vbs to traverse files and display them randomly" Thank you for reading! Hope to share the content to help you, more related knowledge, welcome to follow the industry information channel!