Re: Finding name of a file in a directory
- From: "Al Dunbar [MS-MVP]" <alan-no-drub-spam@xxxxxxxxxxx>
- Date: Fri, 10 Jun 2005 17:53:57 -0600
"Wayne Simacek" <WJSimacek@xxxxxxxxx> wrote in message
news:La7qe.42217$nG6.9008@xxxxxxxxxxxx
>
> "Al Dunbar [MS-MVP]" <alan-no-drub-spam@xxxxxxxxxxx> wrote in message
> news:elIx4yUbFHA.2184@xxxxxxxxxxxxxxxxxxxxxxx
> >
> > "Roland Hall" <nobody@nowhere> wrote in message
> > news:OBIiDiMbFHA.2900@xxxxxxxxxxxxxxxxxxxxxxx
> >> "Al Dunbar [MS-MVP]" wrote in message
> >> news:un0PZpKbFHA.3932@xxxxxxxxxxxxxxxxxxxxxxx
> >> :
> >> : > "Jig Bhakta" wrote in message
> >> : > news:A3BC8A8D-BDCA-4602-941C-2B21AF14F7EF@xxxxxxxxxxxxxxxx
<snip>
> > Oops. It only does that if the script does that, and if the script
accepts
> > the pathname of the file in question as a command line parameter.
> >
> > /Al
> >
> >
> This is a very interesting thread....
> How do you drag a file onto a .vbs script and pass it the paramaters?
Same way you drag a file (or even a set of files) onto a batch script - or a
shortcut to a script:
- click and hold the file to be dragged with the mouse
- drag it over onto the script
- let go of the button.
Passing the file to the script is easy, but there needs to be code in the
script that receives the information. In batch scripts it is %1, %2, and
etc. For vbscript, try this code for starters:
Set objArgs = WScript.Arguments
For I = 0 to objArgs.Count - 1
WScript.Echo objArgs(I)
Next
/Al
.
- References:
- Finding name of a file in a directory
- From: Jig Bhakta
- Re: Finding name of a file in a directory
- From: Roland Hall
- Re: Finding name of a file in a directory
- From: Al Dunbar [MS-MVP]
- Re: Finding name of a file in a directory
- From: Roland Hall
- Re: Finding name of a file in a directory
- From: Al Dunbar [MS-MVP]
- Re: Finding name of a file in a directory
- From: Wayne Simacek
- Finding name of a file in a directory
- Prev by Date: Re: Count Files and Folders
- Next by Date: Re: Equivalent to VBAs Open Dialog Filename
- Previous by thread: Re: Finding name of a file in a directory
- Next by thread: Re: Finding name of a file in a directory
- Index(es):
Loading