Bonjour,
je cherche à réaliser un script spécifique (en powershell ou batch).
toute fois je précise que je suis débutant en informatique.

le script que je cherche à réaliser doit avoir les fonctions suivante:
Lister le contenu d un répertoire "répA" et les copier dans des répertoires bien précis

ci dessous la structure du scripte désiré

Code powershell : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
$source = "C:\Users\ALKAHEST\Desktop\maquette\source\"
$destination = "C:\Users\ALKAHEST\Desktop\maquette\destination\"
 
$tableau_fichiers = _FileListToArrayEx ($source, "*", 1, "", False)
	For $i = 1 to $tableau_fichiers [0]
			$fichier = $tableau_fichiers [$i]
			If not StringInStr($fichier, "300040248300010993550") = 0 Then
				FileCopy ( $fichier , $destination & "Mr1" )
			EndIf
			If not StringInStr($fichier, "138070012931421042031") = 0 Then
				FileCopy ( $fichier , $destination & "BCo" )
			EndIf
			If not StringInStr($fichier, "138070012931621183652") = 0 Then
				FileCopy ( $fichier , $destination & "HJ" )
			EndIf
			If not StringInStr($fichier, "138070012930421967781") = 0 Then
				FileCopy ( $fichier , $destination & "HT" )
			EndIf
			If not StringInStr($fichier, "300040248300011053884") = 0 Then
				FileCopy ( $fichier , $destination & "Mr2" )
			EndIf
			If not StringInStr($fichier, "138070063636021648910") = 0 Then
				FileCopy ( $fichier , $destination & "Mr2" )
			EndIf
			If not StringInStr($fichier, "300040248300011053981") = 0 Then
				FileCopy ( $fichier , $destination & "SDISTRIBUTION" )
			EndIf
			If not StringInStr($fichier, "138070012931121368832") = 0 Then
				FileCopy ( $fichier , $destination & "SIFLOM" )
			EndIf
 
	Next
Cordialement .