Quantcast
Channel: VBForums - Visual Basic .NET
Viewing all articles
Browse latest Browse all 27554

need help making folder backup program

$
0
0
i am attempting to make(using visual studio 2012) a selective folder backup program. i want the program to create a folder inside a Dir and name it the computers current date and time, then copy the folders to be backed up and paste them inside the folder it created. it also needs to be able to check what file is the oldest of 5 and delete it, i want it to loop this action every 30mins

what i have so far
Code:

Private Sub Button5_Click(sender As Object, e As EventArgs) Handles Button5.Click
        Dim filetimestamp As String = DateTime.Now.ToString("yyyyMMddHHmmssff") 'get current date and time
        Dim CheckFileDate = My.Computer.FileSystem.GetFiles("C:\users\Administrator\My documents\Backups") 'get list of files inside the Backups dir
        Dim OldestDate = 'get oldest file from the backups dir
        Dim BackUP = 'file name as current date and time
        My.Computer.FileSystem.CreateDirectory("C:\users\Administrator\My documents\Backups\Backup") 'create the folder with the name as the current date and time
        My.Computer.FileSystem.CopyDirectory("C:\ProgramFiles(x86)\steam\steamapps\common\arma 2 operation arrowhead\@dayzcc_config", "C:\Users\Administrator\My documents\Backups") 'copy the selected file and paste it in the newly created folder
    End Sub

any and all help is greatly appreciated

Viewing all articles
Browse latest Browse all 27554

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>