Use Powershell.
Get-ChildItem -Filter *.dwg -recurse | foreach {
accoreconsole.exe /i "$($_.fullname)" /s "C:\Users\MiralKong\Desktop\TEST\ExtendDataTest.scr"
}
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Hi guys. I'm using a bat file to process a large amount of files. The script I used was as below:
for %%f in ("%~dp0*.dwg") do accoreconsole.exe /i "%%f" /s "C:\Users\MiralKong\Desktop\TEST\ExtendDataTest.scr"
It worked fine except that it only searched the folder which the bat file was in. How could I search all the sub folders recursively in this circumstance? As far as I know the "dir /s/b *.dwg" would list all the match files. However how could it be nested in the for do loop? Thanks in advance.
Use Powershell.
Get-ChildItem -Filter *.dwg -recurse | foreach {
accoreconsole.exe /i "$($_.fullname)" /s "C:\Users\MiralKong\Desktop\TEST\ExtendDataTest.scr"
}