I have a client that uses MozyPro for backups. They have reached their current limit and don’t want to pay for more space. About 99% of the files are in the Home folders for users, a shared folder drive, and a DMS storage folder. What they want is a program/script that will move any files older than a certain date to another folder that is not backed up (not my suggestion, but that is what they want).
Is there a program or script that I can run to perform this opteration?

5 Spice ups

http://mixeduperic.com/windows/how-to-move-files-with-a-batch-file.html

this may help, not sure.

Look at Robocopy

Hope it helps…

1 Spice up

As far as a script goes, I don’t have the exact code but I think the easiest would probably be a two-part script. First a bit to populate a list of all the files that are outside of the date range you want to keep. Then a second part that takes every file on that list and moves it to desired destination. I don’t think I’;ve done any scripts that handle the last date modified identifier of a file, so I don’t know exactly how to do it, but I’m sure a couple minutes on Google could solve that for you if you were so inclined.

I think Robocopy is probably your best option if you are not that great with scripts and robocopy is free

http://www.microsoft.com/download/en/details.aspx?displaylang=en&id=17657

You could use the /MOV and /MINAGE:ndays switches to perform that task

It’s easy with a quick DuckDuckGo search

Powershell:

VBS:

1 Spice up

Or you can create a Backup Exclusion Set and set the last modified date as in the picture below from Mozy’s control panel:

You can either tell it to include files from the last X days or exclude files not modified within X number of days.

Untitled.jpg

3 Spice ups

Here is a short vbscript that may help you

Private Sub RecrusiveSearch(sFolder)
Dim fld, fil

If DateDiff(“d”, sFolder.DateLastModified, Now) > 30 Then
fso.CopyFolder sFolder.Path, Target & "" & sFolder.Name
fso.DeleteFolder sFolder
Exit Sub
End If

For Each fld In sFolder.SubFolders
RecrusiveSearch fld
Next

For Each fil In sFolder.Files
If DateDiff(“d”, fil.DateLastModified, Now) > 30 Then
fil.Move (Target)
End If
Next
End Sub

1 Spice up

I prefer robocopy because you can run copy jobs on separate processing threads and it’s much faster. I’d use something like:

ROBOCOPY [file [file]…] /MOVE /MAXAGE:n /R:n /W:n

The file part after destination can be . if you want it to copy everything. The move switch will move the files and delete them from the source. Max age will only move the files that are older than age n (expressed as YYYYMMDD). R will retry a failed copy after so many second n. W will wait so many seconds n to retry the copy.

Download robocopy here: http://www.microsoft.com/download/en/details.aspx?displaylang=en&id=17657 if you need it.

Reference for you: http://mclaveau.com/gvrac/robo.html

You could use forfiles it a batch file

forfiles /p /s /d -8 /c “cmd /c copy @FILE

example:

forfiles /p c:\filesarehere /s /d-8 /c “cmd /c copy c:\filesarehere@FILE c:\copyisthere”

Once the batch file is done simply put it in your task scheduler.

Pierre-Alain7255 wrote:

You could use forfiles it a batch file

forfiles /p /s /d -8 /c “cmd /c copy @FILE

example:

forfiles /p c:\filesarehere /s /d-8 /c “cmd /c copy c:\filesarehere@FILE c:\copyisthere”

Once the batch file is done simply put it in your task scheduler.

I’ve never heard of forfiles. I’ve just used robocopy and xcopy.

1 Spice up