cables_retake / caption.ps1
cyburn's picture
1st commit
e593b16
raw
history blame contribute delete
No virus
566 Bytes
# This powershell script will create a text file for each files in the folder
#
# Usefull to create base caption that will be augmented on a per image basis
$folder = "D:\models\dariusz_zawadzki\subset_bucket\"
$file_pattern="*.*"
$caption_text="radius kawazaki artstyle"
$files = Get-ChildItem $folder$file_pattern -Include *.png, *.jpg, *.webp -File
foreach ($file in $files) {
if (-not(Test-Path -Path $folder\"$($file.BaseName).txt" -PathType Leaf)) {
New-Item -ItemType file -Path $folder -Name "$($file.BaseName).txt" -Value $caption_text
}
}