Skip to content

Instantly share code, notes, and snippets.

@Caedilla
Created October 20, 2019 21:55
Show Gist options
  • Save Caedilla/c6cc31a9dc3817cadbdecd49aebfe33e to your computer and use it in GitHub Desktop.
Save Caedilla/c6cc31a9dc3817cadbdecd49aebfe33e to your computer and use it in GitHub Desktop.
Dump a list of file paths into a text file on the desktop
$desktop = [Environment]::GetFolderPath("Desktop")
$outputFilePath = "$desktop\Directory.txt"
$dirList = "//film-tvserier/3D Film","//film-tvserier/Film","//film-tvserier/TV"
for($i=0;$i-lt $dirList.Length; $i++){
gci -Path $dirList[$i] -r -af -exclude *.nfo,*.txt,*.srt,*.sub,*.jpg,*.png,*.exe,*.db,*.old | % fullname | Out-File -Append -FilePath $outputFilePath
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment