From 4dd48e138d1286384a3667f6bdf05453767c5d49 Mon Sep 17 00:00:00 2001 From: Christian Pohle Date: Sun, 30 Oct 2022 09:47:51 +0100 Subject: [PATCH] Update CopyGoogleChromeBookmarks.vbs Added File Existence Check --- Microsoft/Windows/CopyGoogleChromeBookmarks.vbs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) mode change 100755 => 100644 Microsoft/Windows/CopyGoogleChromeBookmarks.vbs diff --git a/Microsoft/Windows/CopyGoogleChromeBookmarks.vbs b/Microsoft/Windows/CopyGoogleChromeBookmarks.vbs old mode 100755 new mode 100644 index 4a74caf..0af438f --- a/Microsoft/Windows/CopyGoogleChromeBookmarks.vbs +++ b/Microsoft/Windows/CopyGoogleChromeBookmarks.vbs @@ -1,7 +1,9 @@ ' CopyGoogleChromeBookmarks.vbs - Copy Bookmarks File of Google Chrome to HomeDir ' and retain the last 14 Files (by Creation Date) +' Run from AppSense ' v1.0 - 29.10.2022 - Initial Release +' v1.1 - 30.10.2022 - Added Files Existence Check ' WSHShell Dim objWSH @@ -31,8 +33,10 @@ objFSO.CreateFolder strBackupFolder End If -' Copy File - objFSO.CopyFile strProfileFolder & strBackupFile, strBackupFolder & strActualBackupFile +' Copy File if it exists + If objFSO.FileExists(strProfileFolder & strBackupFile) Then + objFSO.CopyFile strProfileFolder & strBackupFile, strBackupFolder & strActualBackupFile + End If ' FileExists ' Only run if we actually have more than 14 files... Dim objFolder