Please enable JavaScript to view this site.

Knowledge Base

Navigation: Scripting Language > System

which

We've made some changes. Use 'Ctrl-F5' to clear your browser cache.
Scroll Prev Top Next More

Returns the full file pathname for the specified file.

 

This function can be helpful when you have added several directories to the Lumerical path variable and you want to check which files are being accessed.

 

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

 

Syntax

Description

out = which("filename");

Returns the pathname of the file "filename" as a string.

Use ?which("filename"); to display the result to the screen.

 

Examples

Gets the full path and filename of the file results.txt.

file = "results.txt";    # set file name

write(file,"my data file"); # create file

?fullPath = which(file);   # get full name and path

 

> C:/Program Files/Lumerical/FDTD/scripts/results.txt

 

See Also

System level, getpath, addpath, pwd, currentfilename, fileexists

Copyright Lumerical Inc. | Privacy | Site Map