This is a static archive of our old Q&A Site. Please post any new questions and answers at

Relative file paths in Lua scripts?


I have a directory containing my dissector, listener, and subdirectories with libraries. I've been attempting to use dofile, require, and filepath strings to call the libraries along with additional files like so:


require "subdirec.script"

local filename = "subdirec/file.xml"

However, when I attempt using this syntax and open Wireshark I get the “file does not exist error”.

asked 09 May ‘17, 15:54

Irfan%20Hossain's gravatar image

Irfan Hossain
accept rate: 0%