Home » Questions » Computers [ Ask a new question ]

How do I export the history of Skype?

How do I export the history of Skype?

"Is it possible to export Skype v4 chat history into some readable plain-text format?
(.txt, .xml, .html)"

Asked by: Guest | Views: 62
Total answers/comments: 5
Guest [Entry]

"See the script presented here: Save Skype chat history.

Here is the code:

' Define global variables
Dim oFSO, chat_file, folder_to_save
' Directory where You want to save history (you can modify it)
' Now it is relative, so it will be created where Your *.vbs script runs
folder_to_save = ""SkypeChatHistory""
line_count = 0

' Create FSO
Set oFSO = CreateObject(""Scripting.FileSystemObject"")
set_next_free_dir()

' Connect to Skype API via COM
Set oSkype = WScript.CreateObject(""Skype4COM.Skype"", ""Skype_"")
' Open skype, if it is not running
If Not oSkype.Client.IsRunning Then
oSkype.Client.Start()
End If

WScript.Echo ""Skype history will be saved. Found "" & oSkype.Chats.Count & "" chat group.""

' Iterate chats
For Each oChat In oSkype.Chats
names = """"
' First name is You, so it is unnecessary to keep
no_1st_flag = TRUE
For Each oUser In oChat.Members
If no_1st_flag Then
no_1st_flag = FALSE
Else
names = names & ""_"" & oUser.FullName
End If
Next
get_file(""chat"" & names & "".txt"")
chat_file.WriteLine(vbNewLine & ""==== CHAT HISTORY ("" & Replace(names, ""_"", """") & "") ===="" & vbNewLine)
line_count = line_count + oChat.Messages.Count
' Fix by an anonymous commenter
If oChat.Messages.Count > 0 Then
For Each oMsg In oChat.Messages
' Fix by Vadim Kravchenko
On Error Resume Next
chat_file.WriteLine(oMsg.FromDisplayName & "" ("" & oMsg.Timestamp & ""): "" & oMsg.Body)
Next
End If
chat_file.Close
Next

WScript.Echo ""Backup was finished ("" & line_count & "" line saved). You can find your chats in: ./"" & folder_to_save

' Garbage collection
SET chat_file = NOTHING
SET folder_to_save = NOTHING
SET oFSO = NOTHING
SET oSkype = NOTHING

' Access to a file given by name
Sub get_file(file_name)
' Parameter fix by: rommeech
Set chat_file = oFSO.OpenTextFile(folder_to_save & ""/"" & file_name, 8, True, -1)
End Sub

' Find an appropriate directory the logs to save, however, to avoid collision with former dirs
Sub set_next_free_dir()
If oFSO.FolderExists(folder_to_save) Then
ext = 1
While oFSO.FolderExists(folder_to_save & ""_"" & ext) And ext < 100
ext = ext + 1
Wend
folder_to_save = folder_to_save & ""_"" & ext
End If
oFSO.CreateFolder(folder_to_save)
End Sub

Just save it as .vbs file and run it. Then at the first time, Skype will ask you about permission to connect the Skype API, so just click OK. After that it will create a folder called SkypeChatHistory and some files in it which should have your chat history."
Guest [Entry]

"that's the reason why i'm still using Skype 3.

what were they thinking when they removed the /htmlhistory command???

with Skype 4 i'm afraid the only options are commecial programs such as Pamela for Skype (chat recording is not available in the free version).

as for backup and restore the chat history, that's fairly easy:

Locate the folder Application
Data\Skype\ (your username) and copy
it to another location such as a CD or
DVD-ROM.

To restore the history files just copy
the files back to that folder."
Guest [Entry]

The Skype plugin G-Recorder works great for me to backup chats.
The Skype plugin G-Recorder works great for me to backup chats.
Guest [Entry]

"Yo can use this to export chat history data:

http://www.gammatwo.com/2010/12/18/save-skype-chat-history/"
Guest [Entry]

"You just have to go to your user main folder as in win7: C:\Users[your_user]\AppData\Roaming\Skype

Remember that the ""AppData"" folder is hidden, so you might have to select the option to show hidden folders.

Then find the folder with the user name of your skype account and copy it to the new pc... all your chats and contacts icons and etc will be copied to the new computer."