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


I currently have two folders, one with WireShark .pcapng files(folder A) and one with .csv files(folder B) that correspond with the .pcapng files. I would like to know if there is any way I can rename the files in folder B to have the same name as the files in folder A?

i've tried the replace command but couldn’t manipulate it to do what I want . Is there any way this is possible? Thanks, Jennifer

asked 28 Aug '12, 06:06

7878987's gravatar image

accept rate: 0%

edited 28 Aug '12, 08:45

Well, you can rename files on Windows with the ren (rename) command, and on Linux/Unix you can use the mv (move) command. As in "ren file1.pcapng fileA.pcapng" or "mv file1.pcapng fileA.pcapng". Note that it's dangerous to change the filename suffix (.pcapng) to something else, since it will not change the internal format of the files, and will tend to be confusing. Wireshark will still process the files, regardless of the suffix, if opened directly with Wireshark, but it's still confusing and not recommended.

permanent link

answered 28 Aug '12, 08:31

griff's gravatar image

accept rate: 10%


I have converted the files using tshark and extracted specific information into an excel file.What im having problems with keeping the same name for the excel files as the wireshark capture files.I might need to use a string so im currently experimenting with that.


(28 Aug '12, 08:42) 7878987

You do not want Wireshark files and Excel CSV files to have the exact same name, as the former files should be called {something}.pcapng and the latter files should be called {something}.csv. Pcap-ng files should not be given the suffix ".csv" and CSV files for Excel should not be given the suffix ".pcapng", for the reasons griff gave.

If you want to have the CSV file produced from foobar.pcapng to be named foobar.csv, and that's not the case with the files in folders A and B, you might have to rename them one at a time by hand.

(28 Aug '12, 21:31) Guy Harris ♦♦

Why do you want to rename the files? If the CSV files were generated with tshark (or wireshark), simply repeat the "export" operation and this time use the correct filename ;-))


permanent link

answered 28 Aug '12, 09:17

Kurt%20Knochner's gravatar image

Kurt Knochner ♦
accept rate: 15%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text]( "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:


question asked: 28 Aug '12, 06:06

question was seen: 2,956 times

last updated: 28 Aug '12, 21:31

p​o​w​e​r​e​d by O​S​Q​A