Extract nom de dossier

 

# Get the folder names
$directory = "C:\Path\to\Directory"
$folderNames = Get-ChildItem -Path $directory -Directory | Select-Object -ExpandProperty Name
 
# Specify the output file path
$outputFilename = "C:\Path\to\output.csv"
 
# Export the folder names to CSV
$folderNames | Export-Csv -Path $outputFilename -NoTypeInformation
 
Write-Host "Folder names exported to $outputFilename."

Revision #2
Created 31 October 2024 16:46:43 by Cavallone
Updated 20 November 2024 19:53:06 by Cavallone