csitsolutions
Goto Top

Ordner mit bestimmem Namen kopieren

Hallo zusammen,

ich suche schon den ganzen vormittag eine Lösung für folgendes Problem.

Ich möchten aus einem Ordner c:\work alle Ordner mit namen .ready in ein Verzeichnis c:\ verschieben.

Beispiel vorher:

c:\Work\AB122.ready
c:\Work\AB123.ready
c:\Work\AB124.ready
c:\Work\AB125.ready
c:\Work\AB126
c:\Work\AB127
c:\Work\AB128

C:\test\

Nachher

c:\Work\AB126
c:\Work\AB127
c:\Work\AB128

c:\test\AB122.ready
c:\test\AB123.ready
c:\test\AB124.ready
c:\test\AB125.ready

Dachte an Robocopy aber mir ist keine möglichkeit der Selektion eingefallen.Das ganze soll auf einem Windows Server per Skript ausgeführt werden.

Für Vorschläge wäre ich sehr dankbar.

Viele grüße

Christian Schauten

Content-Key: 275333

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

Printed on: April 25, 2024 at 22:04 o'clock

Member: colinardo
Solution colinardo Jun 22, 2015, updated at Jun 26, 2015 at 08:27:11 (UTC)
Goto Top
Hallo Christian,
mit Powershell z.B. ein einfacher Einzeiler face-smile
gci "C:\Work" | ?{$_.PSIsContainer -and $_.Name -like '*.ready'} | move-item -destination 'C:\test' -Force  
Grüße Uwe
Member: csitsolutions
csitsolutions Jun 22, 2015 at 11:57:02 (UTC)
Goto Top
Hallo Uwe,

besten Dank für den tollen Einzeiler!!! Läuft.

Gruß Christian
Member: colinardo
Solution colinardo Jun 22, 2015, updated at Jun 26, 2015 at 08:26:56 (UTC)
Goto Top
Alles klar.
Wenns das dann war, den Beitrag bitte noch auf gelöst setzen. Merci.