Elmar112 10 Posted April 21, 2009 Report Posted April 21, 2009 Guten morgen, ich bin auf der Suche nach einem Script, dass mir Datein mit einem Offset von x Minuten in ein anderes VZ moved/kopiert. Robocopy kann, wenn ich des richtig sehe nur Datein, die älter als x Tage sind.... In meinem Eingangsordner kommen viele kleine Dateien an, die ich alles 15 Minuten wegkopieren/moven möchte. Jetzt muss ich sicherstellen, dass die Dateien identisch in Quelle und Ziel sind. (Rohdaten zuerst in ein Archiv kopieren und dann automatisch auf den Prodserver schieben.) Des kann doch nicht so schwer sein.... Ich find aber nix dazu.... Danke schonmal für Euren Input Elmar Quote
blub 115 Posted April 23, 2009 Report Posted April 23, 2009 Hallo Elmar, Ich würde robocopy in ein Powershellskript einbauen. Etwa so $source="c:\test\" $destination ="c:\test2" $offset=15 $files=gci $source | where{$_.creationtime -lt (get-date).addminutes(-$offset)} $files | foreach { robocopy $source $destination $_.name /Mov /W:1 /R:2 } cu blub Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.