Hi,
How could I retrieve both the source and destination when they are either side of an if statement?
Here is my code:
vb Code:
Private Sub WinVersion() Dim osinfo As OSVERSIONINFO Dim retvalue As Integer Dim sNextFile As String osinfo.dwOSVersionInfoSize = 148 osinfo.szCSDVersion = Space$(128) retvalue = GetVersionExA(osinfo) If osinfo.dwMajorVersion = 7 Then 'Windows 7 If Not Dir$(App.path & "\xlive.dll") <> "" Then path = "C:\Users\" & sUserName & "\AppData\Local\Rockstar Games\GTA IV\Settings\" source = path Else path = "C:\Users\" & sUserName & "\Documents\Rockstar Games\GTA IV\savegames\" destination = path End If ElseIf osinfo.dwMajorVersion = 6 Then 'Vista If Not Dir$(App.path & "\xlive.dll") <> "" Then path = "C:\Users\" & sUserName & "\AppData\Local\Rockstar Games\GTA IV\Settings\" source = path Else path = "C:\Users\" & sUserName & "\Documents\Rockstar Games\GTA IV\savegames\" destination = path End If ElseIf osinfo.dwMajorVersion = 5 Then 'XP If Not Dir$(App.path & "\xlive.dll") <> "" Then path = "C:\Documents and Settings\" & sUserName & "\Local Settings\Application Data\Rockstar Games\GTA IV\Settings\" source = path Else path = "C:\Users\" & sUserName & "\Documents\Rockstar Games\GTA IV\savegames\" destination = path End If 'ElseIf osinfo.dwMajorVersion = 4 Then 'Win2k etc. Else End If 'copy 'Delete (path) End Sub
I need to set the source and destination folders depending on whether or not the "xlive.dll" is location in the folder or not. If there is a better why to copy the files please show me.
Thanks,
Nightwalker




Reply With Quote