powershell read a list of names frmo a file and red in FOR loop
$Dir2 = 'C:\Users\Administrator\Desktop\testDir2'
$filenames=Get-Content $Dir2\filenamesnoext.csv
foreach ($filename in $filenames) {
$found=$false;
Get-ChildItem -Path $Dir2 -Recurse | ForEach-Object {if($filename -eq $_.BaseName) {Write-Host 'FILE ' $filename ' Ok' -foregroundcolor green; $found=$true;CONTINUE }$found=$false;} -END {if($found -ne $true){ Write-Host 'FILE ' $filename ' missing in the folder' -foregroundcolor red}}
}
Get-ChildItem -Path $Dir2 -Recurse | ForEach-Object {$found=$false; foreach ($filename in $filenames) {if($filename -eq $_.BaseName) {Write-Host 'FILE ' $_.BaseName ' was found on the list' -foregroundcolor cyan; $found=$true;BREAK }} if($found -ne $true){ Write-Host 'FILE ' $_.BaseName ' missing on the list of files' -foregroundcolor Magenta} }
Also in C++:
- hide top bar ubuntu 20.04
- dig command
- how to get rid of the start up screen on your pyinstaller .exe file
- create gz in ubuntu
- install pytest
- bash loop over files with extension
- realtek rtl8812au ubuntu
- install zlib ubuntu
- terraform fmt
- dur Quintenzirkel übungen
- zsh wait for user input
- rsync only new files
- install jq command
- git ignore all ds_store
- how to make top bar transparent ubuntu
- install postman in linux
- laravel: command not found
- conda install pytorch
- shell bash kommentti
- install tensorflow from source ubuntu 18.04
- heroku Failed to install gems via Bundler when remove gem rails
- install pip for python 2.7 linux
- mysql execute command from command line
- dependencies needed for kernel edit linux amd64