Be the first to rate this file! 16 Downloads (last 30 days) File Size: 1.64 KB File ID: #22501

ffpath - find file path

by Miroslav Balda

 

20 Dec 2008 (Updated 02 Jan 2009)

The function finds full directory name from matlabpath or system path for the file name

| Watch this File

File Information
Description

The function browses very fast current directory and directories known in 'matlabpath' and the system variable 'path'. It searches for the file, name of which is in the input argument 'fname'. If a directory is found, the output argument pth is filled by a path to the file name from 'fname', otherwise pth is set empty. File names should have their extensions, but MATLAB m-files.

Arguments:
   fname = file name
   pth = path to the fname

Examples:
   pth = ffpath('gswin32c.exe')
% c:\Program Files\gs\gs8.60\bin\
   pth = ffpath('hgrc')
% C:\PROGRA~1\MATLAB\R2006b\toolbox\local

MATLAB release MATLAB 7.3 (R2006b)
Other requirements Windows
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Please login to add a comment or rating.
Updates
02 Jan 2009

A test on presence of a file name as intut argument complemented.

Tag Activity for this File
Tag Applied By Date/Time
file directory Miroslav Balda 22 Dec 2008 15:09:48
path Miroslav Balda 22 Dec 2008 15:09:48
file directory Rob 24 Jan 2012 21:29:22

Contact us at files@mathworks.com