|
This is a little clunky, but it will get you the path to the file. First, write a batch file named findit.bat (or whatever name you would like) that searches for the file and outputs the results to a know location like this: @ECHO OFF DIR c:\%1 /S /B > c:\results.txt Next, use the R:BASE LAUNCH command to run the search (this depends on you knowing the file name to search for). LAUNCH c:\findit.bat|<FILENAME.EXT> Next read the results into a temporary table. GATEWAY IMPORT TXT c:\results.txt CREATE TEMP fsresults Then create some variables in R:BASE to process the results SET VAR vfileandpath TEXT = NULL SET VAR vpath TEXT = NULL Next, pull the result out of the temp table. SELECT field1 INTO vfileandpath FROM fsresults Lastly, use SRPL to strip out the filename from the full result to give you just the path. SET VAR vpath = (SRPL(vfileandpath,'filename.ext','',0)) When you are done, you can DROP the temp table. This method has some drawbacks: 1 - It is kind of clunky. 2 - It is requires you to know the drive the files is saved to, and and to know the file name. 3 - It will require extra coding on your part if there is more than one file on the drive with the same name. You can always cycle through all the returned files and prompt the user for which is the best (or try to read the timestamps and pick the most recent) to address problem 3. You could also use a _vbscript_ file instead of a batch file to hunt for the target file. This would probably allow for an easier time dealing with multiple possible drives, and you could process the filename and path info in _vbscript_ and just return the path so you don't have to process that in R:BASE. Jason Kramer University Archives and Records Management 002 Pearson Hall (302) 831 - 3127 (voice) (302) 831 - 6903 (fax) jan johansen wrote:
|
- [RBASE-L] - Re: Non-Rbase question but related Bill Downall
- [RBASE-L] - Re: Non-Rbase question but related MDRD
- [RBASE-L] - Re: Non-Rbase question but related jan johansen
- [RBASE-L] - Re: Non-Rbase question but related A. Razzak Memon
- [RBASE-L] - Re: Non-Rbase question but related jan johansen
- [RBASE-L] - Re: Non-Rbase question but related Alastair Burr
- [RBASE-L] - Re: Non-Rbase question but related Jason Kramer

