Hi I would like to create a batch file to get all the sub-folders.Can anyone please help me on this?
This is trivial in both batch files or PowerShell:
Batch:
for /r %%x in (*.sql) do (
rem "(or whatever)"
sqlcmd "%%x"
)
PowerShell:
Get-ChildItem -Recurse -Filter *.sql |
ForEach-Object {
sqlcmd $_.FullName # or whatever
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With