Hi and thanks for suggestions.
Now I have a compact version as follows and seems to be working fine, any improvements will be appreciated though.
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Hi,
I have following directory structure on Windows 10:
Random User 1 and Random User 2 are directories which represents dynamically created directories names. Whereas the - Backup\Bookmarks\Chrome structure is constant.
Due to this dynamic naming scheme, I have placed VB Forms application inside the user directory and using "AppDomain.CurrentDomain.BaseDirectory" to define "application's current directory"
Need: I would like to copy bookmark file from this above structure to current user profile (C:\Users\%UserName%\Backup\Bookmarks\Chrome\Bookmarks).
Following has been tried in VB but I am getting error "Index out of bound", any ideas?
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
' Restore Chrome
Dim Chrome_curBackupDir As String = AppDomain.CurrentDomain.BaseDirectory & "\Backup\Bookmarks\Chrome"
Dim Chrome_dstDir() As String = IO.Directory.GetFiles(IO.Path.Combine("C:\Users", Environment.UserName, "AppData", "Local", "Google", "Chrome", "User Data", "Default"), IO.SearchOption.AllDirectories)
System.IO.File.Copy(Chrome_curBackupDir & "\Bookmark", Chrome_dstDir(0), overwrite:=True)
End Sub
Hi and thanks for suggestions.
Now I have a compact version as follows and seems to be working fine, any improvements will be appreciated though.