Get the App
SLTechnology News&Howtos  ›  Development  › 

How to use vbs to traverse files and display them randomly

Shulou Source: shulou.com Published: 2022-06-03 06:50:40 11月15日 Update

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!

Tags: Documents content articles value interests guys buddies more knowledge industry information information channels channels references help Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Shulou Technology Shulou Tech Info vpn Shulou Information macOS