A
A
Anton2015-04-29 10:19:02
Data archiving
Anton, 2015-04-29 10:19:02

What program can create archives and delete them after the time has elapsed?

To keep track of the number of archives and delete the old ones. Free.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
A
Anton, 2015-04-29
@hunk3r

Where is the mistake? (do not look at the lines of the logs)

If s_TargetFolder <> "" Then
    LOGFile.WriteLine ("Архивы будут сохранены в папке: " & s_TargetFolder)
    For n_CurRow = 0 To FolderArc_Index - 1
        If FSO.FolderExists(FolderArc(n_CurRow)) = True Then
            s_ArcFileName = FolderArc(n_CurRow)
    LOGFile.WriteLine (s_ArcFileName)
            s_ArcFileName = Replace(s_ArcFileName, "\\", "")
  LOGFile.WriteLine (s_ArcFileName)		
            s_ArcFileName = Replace(s_ArcFileName, "$", "")
      LOGFile.WriteLine (s_ArcFileName)
            s_ArcFileName = Replace(s_ArcFileName, "\", "_")
      LOGFile.WriteLine (s_ArcFileName)
            s_ArcFileName = Replace(s_ArcFileName, ".", "_")
      LOGFile.WriteLine (s_ArcFileName)
            s_ArcFileName = Replace(s_ArcFileName, ":", ")")
     LOGFile.WriteLine (s_ArcFileName)   
            s_CurArcString = s_ARC_EXE & " " & s_TargetFolder & s_ArcFileName & " " & FolderArc(n_CurRow)
            LOGFile.WriteLine (FormatDateTime(Now, 0) & " Создаем архив: " & FolderArc(n_CurRow) & "       Строка архивации: " & s_CurArcString)
        
            Res_Exec = WShell.Run(s_CurArcString, 5, True)
            If Res_Exec > 0 Then
                LOGFile.WriteLine ("  ^При создании архива возникла ошибка №: " & CStr(Res_Exec))
            End If

I need to output the name of the directory (in this script it is the date) in the name of the archive file. s_ArcFileName = FolderArc(n_CurRow) prints the path to the archived folder in a string.
Archive line: "C:\Program Files\7-Zip\7z.exe" a -m5 C:\20150429\ C)_123 C:\123
Instead of C)_123 you need a file (folder) name

K
Konstantin, 2015-04-29
@fallen8rwtf

I wrote a batch file at work to delete files older than a certain number of days. it's 5 minutes and no "freeware" is needed

L
Lutamir, 2015-04-29
@Ljutamir

Hm. do you need a program? This can also be solved at the level of bash scripts.
We archive with console 7zip for example.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question