Handle pathname in sh and bat