$dir1 = "C:\path\to\dir1"
    $dir2 = "C:\path\to\dir2"

    Get-ChildItem $dir1 -Recurse -Filter *.csv | ForEach-Object {
        $file_path_in_dir1 = $_.FullName
        $file_path_in_dir2 = $_.FullName.Replace($dir1, $dir2)

        # Check if the corresponding file exists in $dir2
        if (Test-Path $file_path_in_dir2) {
            # Run cmd1.exe with the two file paths
            cmd1.exe $file_path_in_dir1 $file_path_in_dir2
        } else {
            Write-Warning "Corresponding file not found in $dir2: $file_path_in_dir2"
        }
    }
$dir1 = "C:\path\to\dir1" $dir2 = "C:\path\to\dir2" Get-ChildItem $dir1 -Recurse -Filter *.csv | ForEach-Object { $file_path_in_dir1 = $_.FullName $file_path_in_dir2 = $_.FullName.Replace($dir1, $dir2) # ตรวจสอบว่ามีไฟล์ที่เกี่ยวข้องอยู่ใน $dir2 if (Test-Path $file_path_in_dir2) { # Run cmd1. exe ที่มีสองพาธของไฟล์ cmd1.exe $file_path_in_dir1 $file_path_in_dir2 } else { คำเตือนการเขียน "ไม่พบไฟล์ที่สอดคล้องกันใน $dir2: $file_path_in_dir2" } }
spam fails_task lang_mismatch pii not_appropriate hate_speech sexual_content quality toxicity humor helpfulness creativity violence