Kopierskript
Hallo zusammen,
ich benötige Hilfe für ein Skript welches ich über GPO ausführen kann, mit folgendem Inhalt
Prüfe ob Verzeichnis C:\Prog\XX vorhanden – wenn ja – benenne die Datei1 in Datei1_old und kopiere die Datei2 in das Verzeichnis C:\Prog\XX
Ich bin leider ein Volldau was Skripting angeht ..
Grüße
ich benötige Hilfe für ein Skript welches ich über GPO ausführen kann, mit folgendem Inhalt
Prüfe ob Verzeichnis C:\Prog\XX vorhanden – wenn ja – benenne die Datei1 in Datei1_old und kopiere die Datei2 in das Verzeichnis C:\Prog\XX
Ich bin leider ein Volldau was Skripting angeht ..
Grüße
Please also mark the comments that contributed to the solution of the article
Content-Key: 273770
Url: https://administrator.de/contentid/273770
Printed on: April 19, 2024 at 15:04 o'clock
2 Comments
Latest comment
Batch:
Powershell
Gruß jodel32
@echo off
set "pfad=c:\prog\xxx"
if exist "%pfad%" (
ren "%pfad%\datei1.txt" datei1_old.txt
copy "\\Server\Share\datei2.txt" "%pfad%"
)
$pfad = "c:\prog\xxx"
if((Test-Path $pfad)){
rename-item "$pfad\datei1.txt" "datei1_old.txt" -Force
copy-item "\\Server\Share\datei2.txt" $pfad -Force
}
Ich bin leider ein Volldau was Skripting angeht
Dann wirds langsam mal Zeit ...Gruß jodel32