
using DIR with wshshell.run
---call.wsf---
<job>
<script language="JScript">
function go() {
var wshshell = new ActiveXObject("WScript.Shell");
wshshell.run("%comspec% /c DIR *.PAB /o /l /b /s > foo.txt", 0, true);
Quote:
}
</script>
<script language="VBScript">
go()
</script>
</job>
---<g>---
--
Mark L. Ferguson Please reply in newsgroup
marfer's notes for OE 5 > http://www.geocities.com/SiliconValley/Bay/6386/IE_ng_notes.htm
Quote:
> how about in vbscript?
> --dir.wsf---
> <job>
> <script language='JScript'>
> var wshshell = new ActiveXObject("WScript.Shell");
> wshshell.run("%comspec% /c DIR *.PAB /o /l /b /s > foo.txt", 0, true);
> </script>
> </job>
> ---end--
> Run this from the root of the folders of interest.
> --
> Mark L. Ferguson Please reply in newsgroup
> marfers notes for OE5 >
> http://www.geocities.com/SiliconValley/Bay/6386/IE_ng_notes.htm
> > I need to know how to execute the dir command from WSH. What I want to do
> > is a DIR *.PAB /o /l /b /s > foo.txt
> > what's the best way to do this?
> > thanks!