diff --git a/tests/scripts/edit_course_html_files.php b/tests/scripts/edit_course_html_files.php
new file mode 100755
index 0000000000..acbb682ea7
--- /dev/null
+++ b/tests/scripts/edit_course_html_files.php
@@ -0,0 +1,33 @@
+
+ */
+require __DIR__.'/../../main/inc/global.inc.php';
+
+// Search string
+$search = 'be:8181';
+$replace = 'be';
+
+$dir = api_get_path(SYS_COURSE_PATH);
+$courses = scandir($dir);
+$i = 0;
+foreach ($courses as $courseDir) {
+ if (substr($courseDir, 0, 1) === '.') {
+ continue;
+ }
+ exec('find '.$dir.$courseDir.'/document/ -type f -name "*.html" -exec sed -i '."'s/hn:8181/hn/g' {} +");
+ //print('find '.$dir.$courseDir.'/document/ -type f -name "*.html" -exec sed -i '."'s/hn:8181/hn/g' {} +
");
+ $i++;
+ //if ($i == 2) {
+ // exit;
+ //}
+ echo "Replaced all $search in ".$dir.$courseDir."
";
+}
+echo "Done";