Often, when you train your Loras, you may wanna add some key words to your description files.This little script often helps me to do it automatically.
param (
[string]$text,
[string]$path
)
$files = Get-ChildItem -Path $path -Filter "*.txt" -File
foreach ($file in $files) {
$filePath = $file.FullName
Add-Content -Path $filePath -Value $text
}
Write-Host "Text appended to all .txt files."
Just save this text in ps1 file and run
> ./append.ps1 ", Name of my lora" "/path/to/my/files/with/txt"