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

tshark fail when it uses filename with space

0

tshark in commonline fail if the pcap file name contain spaces.

example1: tshark -r d:中文 test.pcap example2: tshark -r C:Documents and SettingsAdministrator桌面test.pcap

why wireshark GUI can open and disscet the file whose name contain spaces, how to solve the problem when using tshark?

asked 19 Sep '11, 23:37

ylda_ljm0620's gravatar image

ylda_ljm0620
31101013
accept rate: 0%


One Answer:

2

Because the Wireshark GUI, unlike the Windows cmd.exe command line and the UN*X command line, does not use spaces as command-line token separators.

If you want to access, from the command line, a file whose name contains spaces - or any other character that's a special character to the command interpreter - you have to quote it:

tshark -r "C:\\Documents and Settings\\Administrator\\桌面test.pcap"

This applies to all programs, not just TShark.

answered 19 Sep '11, 23:50

Guy%20Harris's gravatar image

Guy Harris ♦♦
17.4k335196
accept rate: 19%