Returns path of the selected filename.
CurrentPath ( )
(none)
(s) path of currently-selected file.
When a WIL menu shell displays the files in the current directory, one of them may be "selected." This function returns the drive and path of that file, if any.
This is different than a "highlighted" file. When a file is highlighted, it shows up in inverse video (usually white-on-black). To find the filenames that are highlighted, see FileItemize.
Note: This command is not part of the WIL Interpreter package, but is documented here because it has been implemented in many of the shell or file manager-type applications which use the WIL Interpreter. See FileMenu in the WinBatch Users Guide for details.
; Builds full filename before changing directories. ; For Menu based systems only ;Build FileName myfile = StrCat(CurrentPath( ), CurrentFile( )) DirChange("c:\temp") Run("notepad.exe", myfile)