Re: Finding a File by the Extension.
- From: jhoy <jaredhoy@xxxxxxxxxxx>
- Date: Sun, 26 Apr 2009 09:30:01 -0700 (PDT)
On Apr 25, 10:31 pm, "Al Dunbar" <aland...@xxxxxxxxxxx> wrote:
"jhoy" <jared...@xxxxxxxxxxx> wrote in message
news:892f10fa-58a5-494c-97b7-c4b8ae6a98ac@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
On Apr 24, 6:53 pm, "Jon Wallace" <i...@xxxxxxxxxxxxxxxxxxxxx> wrote:
Hi,
I'm not sure I 100% follow what you actually want to do however to get you
Exactly my reaction...
<snip>
Hey Everybody:
I need help with a script I am working on. I am looking to find a file
by extension, put that script in the All Users profile and have it run
on startup. The problem is I need the script to go out search the C:
drive and find the file by the file extension not the file name. I
have written a similar program here that finds it via the full file
name. If anyone can help it would be really appreciated.
set wshShell=CreateObject("Wscript.Shell")
Set objNetwork = CreateObject("WScript.Network")
Set objFSO = CreateObject("Scripting.FileSystemObject")
strCompName = objNetwork.ComputerName
'CSG Startup
If Instr(1,LCase(strCompName),"VCAE",1) > 1 Then
wshShell.run chr(34) & "C:\Program Files\Avaya\Avaya IP Agent
\IpAgent.exe" & chr(34) & "/lang enu",1,true
ElseIf objFSO.FileExists("C:\Documents and Settings\All Users\Start
Menu\Programs\CSG Systems\acsr.lnk") Then
wshShell.run chr(34) & "C:\Documents and Settings\All Users\Start
Menu\Programs\CSG Systems\acsr.lnk" & CHR(34),1,false
Else wshShell.run chr(34) & "C:\Documents and Settings\All Users
\Start Menu\Programs\CSG Systems\nt acsr.lnk" & CHR(34),1,false
End If
'Rumba Startup
If objFSO.FileExists("C:\Program Files\WallData\MFRAME
\rumbaprt.exe") Then
wshShell.run chr(34) & "C:\Program Files\WallData\MFRAME
\rumbaprt.exe" & CHR(34),1,false
End If- Hide quoted text -
- Show quoted text -
Thanks for your quick responses. Let me try and explain my dilemma. I
am trying to search for a *.WPM file extension and load this
application on startup.
OK, then, but *which* .WPM file do you want to deal with, the first one your
script finds? And where will your script need to look - in the current
user's profile, the local hard drive, on a server share, on the internet?
And next, what is a .WPM file, a word perfect macro? or something to do with
Rumba?
I can easily load this on startup by putting
the script in the ALL Users startup menu. But, I need the script to go
and search for this *.WPM file and run it. Part of the problem is you
cannot configure the regular file which is rumbaprt.exe; because once
this is done the program corrupts.
I see, or rather, I can sort of imagine, that you could configure that
executable to run the desired .wpm file automatically, but that would cause
other problems, so you want to run the executable and get it to process the
desired .wpm file.
It has to be configured as the
*.WPM file.
I am beginning to think you should have posted your question in a RUMBAPRT
newsgroup, where people might be more likely to understand the vagaries of
this apparently problematic application.
So basically, I want my script to go out and grab the
*.WPM extension, to run this script. I know it sounds confusing.
Actually, it sounds more like you are not quite sure yourself.
Do you want to find a file (or set of files, or the first file) matching
*.wpm as you sort of said before, or do you only need to grab the extension?
If the latter, here is the extension: "WPM", so just grab it (whatever that
means).
This portion of the script searches for rumbaprt.exe file, but I need
it to search for a *.WPM file instead. Thanks for everyone's help.
'Rumba Startup
If objFSO.FileExists("C:\Program Files\WallData\MFRAME
\rumbaprt.exe") Then
wshShell.run chr(34) & "C:\Program Files
\WallData\MFRAME
\rumbaprt.exe" & CHR(34),1,false
End If
That snippet does not search for rumbaprt.exe; it merely checks to see
whether or not a file by that name at a particular location. The difference
between "rumbaprt.exe" and "*.wmp" is that one is a literal filename and the
other is a wildcard.
The .fileExists method does not suppport wildcards, but even if it did it
wouldn't suit your purpose, as you would still need to determine what the
"*" stands for.
Perhaps if you would indicate where this file might be found and what its
name might be, someone will suggest a solution.
/Al- Hide quoted text -
- Show quoted text -
So this Rumba application saves a terminal session as the WPM file.
For instance, you save this application and it will save as p161.wpm.
But for every machine the name will be different because this connects
back to a database(p161, p162,p163 and so on. I am dealing with over
200 machines. The program is located in C:\Program Files\WallData
\MFRAME. Only one session will be configured per machine. I am using a
group policy so that the desktop is locked down and all the start
menu's look the same. I just need the script to go out and grab the
first and only wpm session that machines. So it would need to go to C:
\Program Files\WallData\MFRAME and find the wpm extension.
.
- Follow-Ups:
- Re: Finding a File by the Extension.
- From: Al Dunbar
- Re: Finding a File by the Extension.
- References:
- Finding a File by the Extension.
- From: jhoy
- Re: Finding a File by the Extension.
- From: Jon Wallace
- Re: Finding a File by the Extension.
- From: jhoy
- Re: Finding a File by the Extension.
- From: Al Dunbar
- Finding a File by the Extension.
- Prev by Date: Re: How to find the operating system bit (x86/x64/ia64)
- Next by Date: Re: Finding a File by the Extension.
- Previous by thread: Re: Finding a File by the Extension.
- Next by thread: Re: Finding a File by the Extension.
- Index(es):
Relevant Pages
|