Reputation: 2145
I'm trying to write a batch file that will find all files with a csproj
extension in a large hierarchy of directories.
Wherever I find one, I want to then create a new SameName.csproj.user
file, and put some hard coded text in it. i.e 'test text'
How can this be done in a batch script?
Upvotes: 0
Views: 946
Reputation: 57242
Not tested:
@echo off
:: put your dir here
pushd c:\cproj_dir
for /f "delims=" %%f in ('dir /b /s /a-d *.csproj') do (
echo test text >"%%~dpfnxf.user"
)
Upvotes: 1