Joe Strazzere - All Things Quality

Visit my new blog at http://strazzere.blogspot.com/


December 1, 2005 - WinTask - SearchPath

Posted in WinTask

'
' SearchPath
'

' Author: Joe Strazzere

'

' This script will search a specified Path to find a given file, and
' return the full path and file name.
'

dim ptr as unsigned


ptr=allocate(255)

Path$="c:;d:"
File$="autoexec.bat"

ret=External("kernel32","SearchPathA",Path$,File$,0,255,ptr,0)

var$=peekstring$(ptr)

 

If ret = 0 then
    Msgbox(File$+" was not found in the path "+Path$)
else
    Msgbox(File$+" can be found at "+var$)
endif


<- Last Page :: Next Page ->

About Me

A gathering place for information and ideas about Quality Assurance, Testing, and other useful topics.

Problems cannot be solved by the same level of thinking that created them. - A. Einstein

Search This Site

Translate This Site

RSS Feed

Subscribe

Twitter

@jstrazzere

Categories

Life
QA
Sports
Tools
WinTask
Work in General

What I'm Reading Now