zdavatz / gdt2dicom

Convert a gdt file and an image folder to a dicom file
GNU General Public License v3.0
0 stars 1 forks source link

rename gdt file for Physioport #39

Closed zdavatz closed 9 months ago

zdavatz commented 9 months ago
$folderPath = "S:\GDT-PhysioPort"
$fileName = "epat.gdt"
$newFileName = "vitaepat.gdt"

while ($true) {
    # Check if the file exists in the specified folder
    if (Test-Path (Join-Path $folderPath $fileName)) {
        # Rename the file
        Rename-Item (Join-Path $folderPath $fileName) (Join-Path $folderPath $newFileName)
        Write-Host "File '$fileName' found and renamed to '$newFileName'."
    }

    # Wait for 5 seconds before checking again
    Start-Sleep -Seconds 5
}