Powershell

Hi,

 I have Multiple files ~ 690(*_YYYYMMDD.xls) files that come to different folders every day with the Previous day-Date stamp. There can be multiple files in a folder for the current day. I want to know how to check if we received all 690 files every day and also the names of missing files and their paths.

As per the below example.. 

xyz_YYYYMMDD.xls (Current day -1) files go to Path 1 and the remaining files go to Path 2. So I want to know how to check if we received all 690 files for today and wanted to know the missing files and their paths.


Can you guys please provide some inputs?

Thanks in Advance.

Example

Filename:
xyz_YYYYMMDD.xls (Current day -1)
xyz_P_YYYYMMDD.xls (Current day -1)
xyz_Q_YYYYMMDD.xls (Current day -1)

Path 1: D:\Powershell\A

Path 2: D:\Powershell\B

Parents
  • 1. Get-WmiObject -Class Win32_OperatingSystem | Select Name | Format-Table -AutoSize
    2. $c New-CimSession -ComputerName $env:computername
    3. Get-Wmiobject win32_operatingsystem | select name
    4. $OSD (Get-WmiObject Win32_Operatingsystem).name
    5. $OS gwmi Win32_OperatingSys
    $OSD ((Get-WmiObject -query 'Select * From Win32_OperatingSYstem').Name)
    6. $OS Invoke-command -Computername $Env:COMPUTERNAME -ScriptBlock {Get-WmiObject win32_OperatingSystem}

    7. $OS ::Win32_OperatingSystem
    $OS (New-Object System.Management.Automation.Host.ChoiceDescription “Windows 10”, “Windows 8.1”, “windows 8”, “..")

    $OSD ("\\$($Env:

Reply
  • 1. Get-WmiObject -Class Win32_OperatingSystem | Select Name | Format-Table -AutoSize
    2. $c New-CimSession -ComputerName $env:computername
    3. Get-Wmiobject win32_operatingsystem | select name
    4. $OSD (Get-WmiObject Win32_Operatingsystem).name
    5. $OS gwmi Win32_OperatingSys
    $OSD ((Get-WmiObject -query 'Select * From Win32_OperatingSYstem').Name)
    6. $OS Invoke-command -Computername $Env:COMPUTERNAME -ScriptBlock {Get-WmiObject win32_OperatingSystem}

    7. $OS ::Win32_OperatingSystem
    $OS (New-Object System.Management.Automation.Host.ChoiceDescription “Windows 10”, “Windows 8.1”, “windows 8”, “..")

    $OSD ("\\$($Env:

Children
No Data