Can we move to archive through this script?

Feb 1, 2010 at 11:51 AM


Firts of all thanks for all the work you already did in creating this script based on 7zip for backup

From the introduction it did not become clear if this can be used or is ment to archive too. In archiving I mean also removing the originals in order to clear diskspace and prevent cluttering.

Your script appears to do already almost everything for this. Here is the scenario that I am thinking of:


Directory structure with all kind of interfacing files between ERP and "the rest of the world".

In many directories we have files of some special extension(s) that we need to move to an archive. The archive is on another server (\\server\archiveshare)

We need to keep files on the original location for some days to review and fix if something went wrong.

Also this applies to log directories of Windows (IIS FTP SMTP etc.)

I was thinking about someting like creating a .csv with the following columns:

Sourcepath (Drive:\path or UNC)

Include subdirs (YES or NO)

Exclude subdirs (mask)

Target path (Drive:\path or UNC)

Filemask  for deleting files  before archiving (should be of same age as for files to archive)

File mask Name & Extension to archive (*) for ALL files *.tmp

File Age in hours/days/weeks/months/years (days is most important)


Inform alert settings: (Mail to administrator if issues arise)

Logging level: 1 = log start stop succes; 2 = log errors; 3 log warnings; 4 log ALL

I realise this might be a lot to ask but it would realy help. I guess these features would be interesting for a lot of us?

G.W. Scheppink












Feb 1, 2010 at 12:58 PM

Hi and thank you for your appreciated post.

As you have already spotted the script came in my mind for backup purpouses. Nevertheless the "archive" option might be ... an option as well.

So ... let's follow your points and feel free to amend me if I misintepret your needs:

* Source Path : actually the selection criteria is very flexible in the definition of where to search files being backed-up. If you look at "Prepare your first selection criteria" paragraph depicted in the Documentation page you can find several commented directives which can help defining even complex logic in path/file selection (file ages, regular expressions over names and paths, extensions, whether to follow junctions or not etc.). In addition to that there is always an implied selection condition which relies over the presence (or not) of the "Archive" attribute on files which is driven by the type of backup your're performig. *There is a limitation tough*: as the script "builds" a virtual root of directories by the means of Junctions ... *as NTFS Junctions can not point to remote UNC shares*, this script will be naturally limited to the boundaries of the server (or pc) where it is running.

* Email Alerts : at present the script is already able to send a detailed report of the operation to one or more email addresses. You might find useful information in the hardcoded-vars file.

* Verbosity : The report being produced by the script is, necessarly, detailed as we most often use it to control remote backups being performed nightly. Therefore we do need a comprehensive report via email in one shot rather than go to the remote machine and look for exceptions. Nevertheless your suggestion brings to mi mind the option to detail logs to events at different levels of verbosity. Does it make sense to you ?

I think the only aspect which is not covered at all by the script is the option to delete source files. For this topic I must admit I have not completely understood your request: the first thing that came to my mind was you might expect to have source files deleted *after* a successful backup operation, but when reading your post I see you write "Filemask  for deleting files before archiving". Could you please clarify this ?

Thank you.


Marked as answer by Anlan on 10/29/2013 at 2:46 AM