eil wrote: idea is not to copy as a whole
but in parts: with scripting, save in different files all that user could change from fresh install".
I am not sure if I get you, or I miss something?
All settings are in the main INI file, called deafult "XYplorer.ini", located in "Application Data Folder" (
http://www.xyplorer.com/xyfc/viewtopic. ... 408#p61408 )
There you can see your settings. e.g.
[CustomButtons]
[Aliases]
[FileAssoc] PFA
[Favorites]
Do you need now a script to split that INI into parts on each section like "[CustomButtons]" ???
All others are in that "Application Data Folder", which you can backup in whole to extract later what you need.
Here is a backup script to run manually or scheduled from windows scheduler:
[spoiler]
Code: Select all
'// Backup whole XYplorer Applications Data Folder , v001, 2013-10-22 by Stefan
' - store this as plain text file with VBS extension in the XYplorer folder
' - adjust the User Settings to match your environment
' - launch the VBS by double click to backup for XYplorer settings (or create a windows scheduler task)
'// === User Settings:
XYPath = ".\"
RARexe = XYPath & "Tools\Packer\rar.exe"
Backup_MainFolder = "D:\Backups\XYplorer\"
TimeStamp = Year(Now) & "_" & right(Month(Now),2) & "_" & right(Day(Now),2) & "_" & right(hour(now),2) & right(minute(now),2)
'// === The Code:
Set WSS = Wscript.CreateObject("WScript.Shell")
Set FSO = Wscript.CreateObject("Scripting.FileSystemObject")
'// create backup folder with date timestamp for plain copy
'BackupFolder = Backup_MainFolder & TimeStamp
'If Not FSO.FolderExists(BackupFolder) Then FSO.CreateFolder(BackupFolder)
'// get XY "Application Data Folder" location
If FSO.FileExists(XYPath & "XYplorer.exe") Then
XYVer = FSO.GetFileVersion(XYPath & "XYplorer.exe")
startupini = XYPath & "startup.ini"
If FSO.FileExists(startupini) Then
Set objFile = FSO.GetFile(startupini)
If objFile.Size > 0 Then
Set objFile = FSO.OpenTextFile(startupini, 1)
'File_ReadAll = objFile.ReadAll
Do Until objFile.AtEndOfStream
StrData = objFile.ReadLine
If InStr(ucase(StrData), "PATH") Then
StrData = right(StrData, Len(StrData) - InStr(StrData, "=") )
If InStr(StrData, "%") Then
StrData = WSS.ExpandEnvironmentStrings(StrData)
End If
Exit Do
End If
Loop
objFile.Close
End If
XYData = StrData
Else
XYData = XYPath & "\Data"
End If
Else
MsgBox "wrong path to XYplorer.exe and startup.ini. Script quits."
End If
'// Debug:
'MsgBox "XYData: " & XYData
'WSS.run "explorer.exe /e," & XYData
'// Plain copy
'FSO.CopyFolder XYData, BackupFolder
'// RARing
'RAR <command> [ -<switches> ] <archive> [ <@listfiles...> ] [ <files...> ] [ <path_to_extract\> ]
'a Add files to archive.
'-ep1 Exclude base dir from names.
'-ag[format] Generate archive name using the current date and time.
WSS.run RARexe & " a -ep1 " & chr(34) & Backup_MainFolder & "\XY_v" & XYVer _
& "_Settings-Backup_" & TimeStamp & ".rar" & chr(34) & " " & chr(34) & XYData & chr(34)
'// Show result
WSS.run "explorer.exe /e," & Backup_MainFolder
'EOF
[/spoiler]
.