-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmove_xampp_dir.bat
21 lines (17 loc) · 1.77 KB
/
move_xampp_dir.bat
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
@echo off
set /p sSearchStr="Enter old XAMPP path: "
set /p sReplaceStr="Enter new XAMPP path: "
setlocal
set sSearchStrBack=%sSearchStr:/=\\%
set sReplaceStrBack=%sReplaceStr:/=\\%
powershell -Command "(gc 'apache/conf/httpd.conf') -replace '%sSearchStr%', '%sReplaceStr%' | Out-File 'apache/conf/httpd.conf' -Encoding ASCII"
powershell -Command "(gc 'apache/conf/extra/httpd-autoindex.conf') -replace '%sSearchStr%', '%sReplaceStr%' | Out-File 'apache/conf/extra/httpd-autoindex.conf' -Encoding ASCII"
powershell -Command "(gc 'apache/conf/extra/httpd-dav.conf') -replace '%sSearchStr%', '%sReplaceStr%' | Out-File 'apache/conf/extra/httpd-dav.conf' -Encoding ASCII"
powershell -Command "(gc 'apache/conf/extra/httpd-manual.conf') -replace '%sSearchStr%', '%sReplaceStr%' | Out-File 'apache/conf/extra/httpd-manual.conf' -Encoding ASCII"
powershell -Command "(gc 'apache/conf/extra/httpd-multilang-errordoc.conf') -replace '%sSearchStr%', '%sReplaceStr%' | Out-File 'apache/conf/extra/httpd-multilang-errordoc.conf' -Encoding ASCII"
powershell -Command "(gc 'apache/conf/extra/httpd-ssl.conf') -replace '%sSearchStr%', '%sReplaceStr%' | Out-File 'apache/conf/extra/httpd-ssl.conf' -Encoding ASCII"
powershell -Command "(gc 'apache/conf/extra/httpd-vhosts.conf') -replace '%sSearchStr%', '%sReplaceStr%' | Out-File 'apache/conf/extra/httpd-vhosts.conf' -Encoding ASCII"
powershell -Command "(gc 'apache/conf/extra/httpd-xampp.conf') -replace '%sSearchStr%', '%sReplaceStr%' | Out-File 'apache/conf/extra/httpd-xampp.conf' -Encoding ASCII"
powershell -Command "(gc 'mysql/bin/my.ini') -replace '%sSearchStr%', '%sReplaceStr%' | Out-File 'mysql/bin/my.ini' -Encoding ASCII"
powershell -Command "(gc 'php/php.ini') -replace '%sSearchStrBack%', '%sReplaceStrBack%' | Out-File 'php/php.ini' -Encoding ASCII"
pause