Ok so you might do something like the following:
#Change the directory to where your cookies are located
#As an example I believe windows uses the following directory:
Dir.chdir(“C:/Documents and Settings/username/cookies”) #not positive on
cookies = Dir.glob("*.txt")
cookies.each do |file|
info = File.readlines(file)
#here is where you would put the code to manipulate the data
#as you see fit. The name and content is in the info array.
Firefox is a bit different however; it stores all the cookie information
in one text file.
So instead of reading each file individually you would open that single
file and use split to organize the data into an array.
cookies = File.readlines(“cookies.txt”)
Note there are much faster ways of reading a file but this only
usually applies to very large files… File.readlines should be
sufficient for what you’re doing.