We study the problem of searching for a fixed path ǫ0ǫ1 • • • ǫ l on a network through random walks. We analyze the first hitting time of tracking the path, and obtain exact expression of mean first hitting time T . Surprisingly we find that T is divided into two distinct parts: T1 and T2. The first part T1 = 2m l−1 i=1 d(ǫi), is related with the path itself and is proportional to the degree product. The second part T2 is related with the network structure. Based on the analytic results, we propose a natural measure for each path, i.e. ϕ = l−1 i=1 d(ǫi), and call it random walk path measure(RWPM). ϕ essentially determines a path's performance in searching and transporting processes. By minimizing ϕ, we also find RW optimal routing which is a combination of random walk and shortest path routing. RW optimal routing can effectively balance traffic load on nodes and edges across the whole network, and is superior to shortest path routing on any type of complex networks. Numerical simulations confirm our analysis.