Hi, 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 edited 28 Aug '12, 08:45 |
2 Answers:
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. answered 28 Aug '12, 08:31 griff |
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 ;-)) Regards answered 28 Aug '12, 09:17 Kurt Knochner ♦ |
Hi,
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.
Thanks,
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.