Earlier quoted context omitted.
Yeah, this syntax looks a bit unwieldy: "${NEW}"/* But it's specifically to do wildcard expansion of the quoted string, and the shell interpreter is happy with it. I'm open to suggestions for improvements though. :) --- This is confusing to me: ... you can just make the list of files (maybe even write it to the file, maybe even write a batch file which would move them) and use it for moving the data from pgdata to ol…
> I'm not understanding what you're meaning here. If this was PowerShell then I would just get the list of files in $PGDATA, create folders and then move the files in the list, ie $files = gci $PGDATA try { New-item "$PGDATA/old" -erroraction stop New-item "$PGDATA/new" -erroraction stop } catch { throw "Failed to create the necessary dirs" } try { $files | Move-Item -Destination "$PGDATA/old" -erroraction stop } cat…
:D
---
Oh. Now I understand the purpose of grabbing a file list first. That would allow for creating both old + new dirs first, prior to any move attempt.
I'll think it over. I'm kind of on the fence about it at first though. Lets see what I reckon after sleeping on it.
Thanks for following up btw. :)