rado
Goto Top

Batch: Neue Dateien kopieren

Nur Dateien mit Tagesdatum sollen kopiert werden

Hallo alle miteinander. Vielleicht könnt ihr mir bei meinem Problem weiterhelfen?!

Ich benötige einen Batch Befehl (oder vergleichbares) der neue Dateien automatisch in einen anderen Ordner kopiert.

Ein xcopy mit Paramter D: scheidet aus, da Ziel- und Quellverzeichnis nicht vergleichbar sind.

Alternativ kann der Batch Befehl auch das Datum prüfen und die Dateien mit Tagesdatum kopieren.

Gibts es da Ideen von euch?
Gruß Rado

Content-Key: 10317

Url: https://administrator.de/contentid/10317

Ausgedruckt am: 28.03.2024 um 14:03 Uhr

Mitglied: meinereiner
meinereiner 04.05.2005 um 21:54:14 Uhr
Goto Top
versuchs mal mit dem Schalter /m, dann werden nur Dateien mit Archivbit kopiert und dieses nach dem kopieren zurück gesetzt.
Mitglied: rado
rado 06.05.2005 um 08:48:33 Uhr
Goto Top
Der Paramter /M scheint zu klappen.
Einziges Problem:

Wenn ich den xcopy befehl mit den Parmetern /C /R /I /Y /M starteund der Batch findet keine (neuen) Dateien die er kopieren kann, dann wird das Zielverzeichnis einfach gelöscht??

Was ist das nun wieder?
Mitglied: gemini
gemini 06.05.2005 um 10:11:13 Uhr
Goto Top
Evtl. ist Robocopy aus dem Ressource Kit eine Lösung für dein Problem.
<blockquote>Monitoring a Directory Tree
Using the /MON:n and /MOT:m switches you can Monitor the source directory tree for changes, and copy changes as and when they occur. The /MON:n switch specifies the minimum number of changes that must occur before running again. The /MOT:m switch specifies the minimum time, in minutes, that must elapse before running again.
If you only specify one of these switches, the other is assumed to have a value of 1.

When Monitoring is specified, Robocopy never terminates. Instead, it enters a loop that performs a normal Robocopy pass and then monitors the source directory tree for changes, until both n changes have been detected and m minutes have elapsed. When both conditions are met, another Robocopy pass is started. This whole process of copying and monitoring is repeated, ad infinitum, until the user manually terminates the Robocopy process.

As a minimum, Robocopy monitors the source directory tree for changes to file and directory names, sizes, and last write times. If attributes are to be copied Robocopy will also monitor the tree for attribute changes. Similarly, if security information is to be copied, Robocopy will also monitor the tree for security changes.

Consequently, a user performing an edit and saving a single new file, for example, may cause multiple changes of various types to be reported back to Robocopy. Therefore some experimentation may be required to determine appropriate threshold values for /MON and /MOT for each Robocopy job, especially those monitoring busy trees.</blockquote>
Mitglied: rado
rado 06.05.2005 um 12:42:29 Uhr
Goto Top
Danke für den Tip!

Wo bekommt man den Windows 2000 Resource Kit für nen kleinen Geldbeutel her?
Mitglied: gemini
gemini 06.05.2005 um 16:41:59 Uhr
Goto Top
Die RK Tools gibts hier:
Windows 2000: http://www.microsoft.com/windows2000/techinfo/reskit/default.asp
Windows 2003: http://www.microsoft.com/downloads/details.aspx?FamilyID=9d467a69-57ff- ...
Bei den Windows 2000 Free Tools ist Robocopy allerdings nicht dabei.
Du kannst es dir aber vom 2003 RK downloaden, sollte genauso gut funktionieren.
Da ist auch ein 35-seitiges Manual dabei. Ein Blick lohnt, Robocopy ist ziemlich mächtig.
Mitglied: rado
rado 07.05.2005 um 11:45:29 Uhr
Goto Top
Herzlichen Dank für die Informationen!