POV-Ray : Newsgroups : povray.off-topic : Context switching : Re: Context switching Server Time
8 Oct 2024 17:21:59 EDT (-0400)
  Re: Context switching  
From: scott
Date: 22 Apr 2010 05:40:06
Message: <4bd01976$1@news.povray.org>
> ...so how do you actually do this then?

Save the text below as "demoScript.vbs" and double-click it.  It will write 
a list of all files in your C: drive to a text file called "FileList.txt". 
Obviously way more complex stuff can be done (like recursing subdirectories 
if you want).  Google "VBscript tutorial".


Set fso = CreateObject("Scripting.FileSystemObject")
sFolder = "C:\"

Set NewFile = fso.CreateTextFile(sFolder&"\FileList.txt", True)
Set folder = fso.GetFolder(sFolder)
Set files = folder.Files

For each folderIdx In files
  NewFile.WriteLine(folderIdx.Name)
Next

NewFile.Close
Wscript.Echo "Done!"


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.