Answer the question
In order to leave comments, you need to log in
How to replace paths in all project files?
A large project, a lot of *.c, *.lib, *.js, *.html files, etc., the paths that need to be replaced are written inside (the part that is up to the project folder itself). Now in each file I change all the paths in sublime at once, but there are quite a few files. How to do it faster through the Windows command line?
Answer the question
In order to leave comments, you need to log in
Replace Text
www.ecobyte.com/replacetext
or batch file:
@echo off
Setlocal EnableExtensions
Set infile=%1
Set find=что_меняем
Set replace=на_что_меняем
SetLocal EnableDelayedExpansion
for /f "usebackq delims= eol=" %%n in (!infile!) do (
set LINE=%%n
set TMPR=!LINE:%find%=%replace%!
Echo !TMPR!>>!infile!-TMP.TXT
)
copy %infile% %infile%.bak
move %infile%-TMP.TXT %infile%
so why in each file - change at once in all
for example textpad can do this
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question