Skip to content

Instantly share code, notes, and snippets.

@we684123
Created October 25, 2024 02:27
Show Gist options
  • Save we684123/df4dd5386b616605d89096d3e1fa2d4c to your computer and use it in GitHub Desktop.
Save we684123/df4dd5386b616605d89096d3e1fa2d4c to your computer and use it in GitHub Desktop.
Get-ChildItem -File -Filter "*.xlsx" | ForEach-Object {
$folderName = [System.IO.Path]::GetFileNameWithoutExtension($_.Name)
if (-not (Test-Path -Path $folderName)) {
New-Item -ItemType Directory -Name $folderName
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment