This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Using Vbscript, I am trying to copy files with certain file extensions such as [.tmp, .dat, .txt] from folder and subfolder in more than one location to %AppData% destination user an elevated privillege. Below is the sample of my code that prompts Permission Denined | |
' Require variables to be defined | |
Option Explicit | |
' Global variables | |
Dim strBaseFolder | |
Dim strDestFolder | |
Dim objFSO | |
Dim objFolder |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
runBackup | |
Function runBackup() | |
Dim fileName, folderToBackup, fileToBackupTo, currentDate, fileExtensions, eachFileWrite, totalFileWrite | |
currentDate = DAY(date()) & "." & Month(date()) & "." & YEAR(Date()) | |
fileName = "uTorrent " & currentDate & ".zip" 'File name; leave everything from the first "&" onwards | |
folderToBackup = "C:\Users\mlevit\AppData\Roaming\uTorrent" ' Location you wish to backup | |
fileExtensions = array("dat", "old") 'Specify which extensions you wish to backup on (i.e. leave as "array()" if you want the entire folder) |