• דף הבית
    • אינדקס קישורים
    • פוסטים אחרונים
    • משתמשים
    • חיפוש בהגדרות המתקדמות
    • חיפוש גוגל בפורום
    • ניהול המערכת
    • ניהול המערכת - שרת private
    • הרשמה
    • התחברות

    אתר העתקת מערכות מתקדם - העברת רוב סוגי הקבצים

    מתוזמן נעוץ נעול הועבר טיפים עצות והדגמות מהמשתמשים
    52 פוסטים 9 כותבים 893 צפיות 3 עוקבים
    טוען פוסטים נוספים
    • מהישן לחדש
    • מהחדש לישן
    • הכי הרבה הצבעות
    תגובה
    • תגובה כנושא
    התחברו כדי לפרסם תגובה
    נושא זה נמחק. רק משתמשים עם הרשאות מתאימות יוכלו לצפות בו.
    • א מנותק
      אA @lavitoren הטי"ל
      נערך לאחרונה על ידי

      @lavitoren-הטי-ל
      לא תצטרך.
      כמדומני שזה פשוט מוגדר בקוד הסיומות שסורק.
      תוכל פשוט למחוק את הסיומות האחרות

      תגובה 1 תגובה אחרונה תגובה ציטוט 1
      • א מנותק
        אA @lavitoren הטי"ל
        נערך לאחרונה על ידי

        @lavitoren-הטי-ל
        נו, אז יש.
        אתה לא רואה?

        L 2 תגובות תגובה אחרונה תגובה ציטוט 1
        • L מנותק
          lavitoren הטי"ל @אA
          נערך לאחרונה על ידי

          @אA כרגע אין לי לשעות הקרובות בינה אז איך אדע מה למחוק ומה להשאיר

          L תגובה 1 תגובה אחרונה תגובה ציטוט 0
          • L מנותק
            lavitoren הטי"ל @lavitoren הטי"ל
            נערך לאחרונה על ידי

            פתחתי ונראה לי מורכב מדי בשביל 2 לפנות בוקר של אחרי הטשולנט והקיג'ל...

            תגובה 1 תגובה אחרונה תגובה ציטוט 1
            • L מנותק
              lavitoren הטי"ל @אA
              נערך לאחרונה על ידי

              @אA
              שגיאה
              ניתן להצביע בעד משתמש מסוים רק 6 פעמים ביום....

              ל תגובה 1 תגובה אחרונה תגובה ציטוט 0
              • ו מנותק
                וזכיני לגדל
                נערך לאחרונה על ידי

                זה כמו הרעיון של @טנטפון לא?

                תגובה 1 תגובה אחרונה תגובה ציטוט 0
                • פ מנותק
                  פתרון AI @אA
                  נערך לאחרונה על ידי

                  @אA זה מעתיק בצד שרת או צד דפדפן?

                  א תגובה 1 תגובה אחרונה תגובה ציטוט 0
                  • ל מנותק
                    לימוד בתורת מרן @lavitoren הטי"ל
                    נערך לאחרונה על ידי לימוד בתורת מרן

                    @lavitoren-הטי-ל כתב:

                    @אA
                    שגיאה
                    ניתן להצביע בעד משתמש מסוים רק 6 פעמים ביום....

                    @lavitoren-הטי-ל זה מוגבל רק על אותו משתשמש אתה יכול להצביע למשתמש אחר עוד 6

                    L תגובה 1 תגובה אחרונה תגובה ציטוט 0
                    • ה מנותק
                      הדיבל המעופף @אA
                      נערך לאחרונה על ידי

                      @אA
                      ישכ"ח זה מטורףףף

                      תגובה 1 תגובה אחרונה תגובה ציטוט 0
                      • L מנותק
                        lavitoren הטי"ל @לימוד בתורת מרן
                        נערך לאחרונה על ידי

                        @לימוד-בתורת-מרן גלוי וידוע

                        @לימוד-בתורת-מרן כתב:

                        זה מוגבל רק על אותו משתשמש אתה יכול להצביע למשתמש אחר עוד 6

                        (תראה כמה מוניטין יש לי וכמה זמן אני פה, כתבתי את זה וכותבים את זה בד"כ להראות שאילו יכולתי הייתי מוסיף עוד אבל אין לי אפשרות...)

                        L תגובה 1 תגובה אחרונה תגובה ציטוט 0
                        • L מנותק
                          lavitoren הטי"ל @lavitoren הטי"ל
                          נערך לאחרונה על ידי

                          בדיקה 8.html

                          למי שיש כח להמשיך אותי ולסדר את זה יש עוד כמה תיקונים אחרונים

                          1. כשבוחרים הכל שיבחר הכל
                          2. בעץ שלוחות שיעשה קובץ וורד למשל כמו הקובץ המצורף
                          א תגובה 1 תגובה אחרונה תגובה ציטוט 0
                          • L מנותק
                            lavitoren הטי"ל @אA
                            נערך לאחרונה על ידי lavitoren הטי"ל

                            @אA זה גם משהו אבל הוספתי בזכות שצירפת את הקוד כמה דברים

                            תגובה 1 תגובה אחרונה תגובה ציטוט 0
                            • א מנותק
                              אA @lavitoren הטי"ל
                              נערך לאחרונה על ידי

                              @lavitoren-הטי-ל

                              נשמע טוב, אבל א"א להעלות קבצים כאלו לאתר.
                              אפשר רק מכווץ או קוד.

                              תגובה 1 תגובה אחרונה תגובה ציטוט 1
                              • א מנותק
                                אA @פתרון AI
                                נערך לאחרונה על ידי

                                @פתרון-AI
                                כלומר?
                                אם זה מריץ על שרת או על דפדפן?!
                                זה אתר שמבוסס על HTML לא על שרת.

                                תגובה 1 תגובה אחרונה תגובה ציטוט 0
                                • י מנותק
                                  י.ע @אA
                                  נערך לאחרונה על ידי

                                  @אA למה צריך לבחור מספר ספרות לשלוחה
                                  כלומר לא הבנתי מה צריך למלאות שם יש לי שלוחות עם ספרה אחת ויש עם 5 הואט לא יכול לחפש לבד???
                                  ושאני מקי 5 אז את כל ה1 הוא לא ימצא?

                                  ה תגובה 1 תגובה אחרונה תגובה ציטוט 0
                                  • ק מנותק
                                    קו הרהיטים
                                    נערך לאחרונה על ידי

                                    גם אני נהנתי מזה כמו הרבה דברים שאתה עושה , יישר כח עצום!!!!!

                                    תגובה 1 תגובה אחרונה תגובה ציטוט 0
                                    • ה מנותק
                                      הדיבל המעופף @י.ע
                                      נערך לאחרונה על ידי הדיבל המעופף

                                      @י.ע

                                      @י.ע כתב:

                                      @אA למה צריך לבחור מספר ספרות לשלוחה
                                      כלומר לא הבנתי מה צריך למלאות שם יש לי שלוחות עם ספרה אחת ויש עם 5 הואט לא יכול לחפש לבד???

                                      השאלה היא כמה קשה האתר יעבוד לדוגמא אם אתה בוחר 1 הוא יצטרך לנסות 10 קומבינציות ואם תבחר 2 הוא ינסה 99 וכולי על זה הדרך אתה יכול לנסות לשים אותו על ארבע יקח לו המון זמן לסרוק את המערכת

                                      ושאני מקי 5 אז את כל ה1 הוא לא ימצא?

                                      הוא ימצא (בכלל מנה מאתיים)

                                      L תגובה 1 תגובה אחרונה תגובה ציטוט 1
                                      • L מנותק
                                        lavitoren הטי"ל @הדיבל המעופף
                                        נערך לאחרונה על ידי

                                        @הדיבל-המעופף רגע כשאני בוחר 4 הוא לא מחפש שלוחות שיש בהם רק 4 ספרות כלומר מה הוא סורק גם שלוחות של ספרה 1 ו 2 ו 3?

                                        ה תגובה 1 תגובה אחרונה תגובה ציטוט 0
                                        • ה מנותק
                                          הדיבל המעופף @lavitoren הטי"ל
                                          נערך לאחרונה על ידי

                                          @lavitoren-הטי-ל
                                          כן הוא סורק גם 3 2 1

                                          תגובה 1 תגובה אחרונה תגובה ציטוט 1
                                          • L מנותק
                                            lavitoren הטי"ל @אA
                                            נערך לאחרונה על ידי

                                            @אA אני לא יודע אם זה הורס יותר או פחות טוב מה שאני מביא בכל אופן בעץ שלוחות זה לא הלך לי תראו בצעמכם

                                            <!DOCTYPE html>
                                            <html lang="he" dir="rtl">
                                            <head>
                                                <meta charset="UTF-8">
                                                <meta name="viewport" content="width=device-width, initial-scale=1.0">
                                                <title>מערכת העתקת קבצים ועץ שלוחות מתקדמת</title>
                                                <style>
                                                    :root {
                                                        --bg-gradient: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 50%, #bae6fd 100%);
                                                        --card-bg: #ffffff;
                                                        --card-border: #e0f2fe;
                                                        --text-main: #0f172a;
                                                        --text-secondary: #475569;
                                                        --primary-blue: #0284c7;
                                                        --primary-blue-hover: #0369a1;
                                                        --secondary-blue: #38bdf8;
                                                        --danger-red: #ef4444;
                                                        --danger-red-hover: #dc2626;
                                                        --input-bg: #f8fafc;
                                                        --input-border: #cbd5e1;
                                                        --section-bg: #f8fafc;
                                                        --section-border: #e2e8f0;
                                                        --info-bg: #f0f9ff;
                                                        --info-border: #bae6fd;
                                                        --info-text: #0369a1;
                                                    }
                                            
                                                    body.dark-mode {
                                                        --bg-gradient: linear-gradient(135deg, #1e1e1e 0%, #121212 100%);
                                                        --card-bg: #1f1f1f;
                                                        --card-border: #2c2c2c;
                                                        --text-main: #e0e0e0;
                                                        --text-secondary: #a0a0a0;
                                                        --primary-blue: #38bdf8;
                                                        --primary-blue-hover: #0284c7;
                                                        --secondary-blue: #0284c7;
                                                        --input-bg: #2a2a2a;
                                                        --input-border: #404040;
                                                        --section-bg: #252525;
                                                        --section-border: #333333;
                                                        --info-bg: #222b32;
                                                        --info-border: #2d3748;
                                                        --info-text: #63b3ed;
                                                    }
                                            
                                                    body {
                                                        font-family: 'Segoe UI', system-ui, -apple-system, BlinkMacSystemFont, Roboto, sans-serif;
                                                        margin: 0;
                                                        padding: 40px 20px;
                                                        background: var(--bg-gradient);
                                                        color: var(--text-main);
                                                        min-height: 100vh;
                                                        text-align: right;
                                                        direction: rtl;
                                                        box-sizing: border-box;
                                                        transition: background 0.3s ease, color 0.3s ease;
                                                    }
                                            
                                                    .container {
                                                        max-width: 950px;
                                                        margin: 0 auto;
                                                        background: var(--card-bg);
                                                        border: 1px solid var(--card-border);
                                                        border-radius: 20px;
                                                        padding: 40px;
                                                        box-shadow: 0 20px 40px -15px rgba(2, 132, 199, 0.12);
                                                        transition: background 0.3s ease, border-color 0.3s ease;
                                                    }
                                            
                                                    .header {
                                                        text-align: center;
                                                        margin-bottom: 35px;
                                                        position: relative;
                                                    }
                                            
                                                    .theme-toggle-container {
                                                        position: absolute;
                                                        top: 0;
                                                        left: 0;
                                                    }
                                            
                                                    h2 {
                                                        font-size: 2.2rem;
                                                        font-weight: 800;
                                                        margin: 0 0 8px 0;
                                                        color: var(--primary-blue);
                                                        letter-spacing: -0.5px;
                                                    }
                                            
                                                    .subtitle {
                                                        color: var(--text-secondary);
                                                        font-size: 1rem;
                                                        margin: 0;
                                                    }
                                            
                                                    h3 {
                                                        color: var(--text-main);
                                                        font-size: 1.25rem;
                                                        margin-top: 0;
                                                        margin-bottom: 16px;
                                                        font-weight: 700;
                                                        display: flex;
                                                        align-items: center;
                                                        gap: 8px;
                                                    }
                                            
                                                    .section {
                                                        background: var(--section-bg);
                                                        border: 1px solid var(--section-border);
                                                        padding: 24px;
                                                        margin-bottom: 20px;
                                                        border-radius: 14px;
                                                        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
                                                        transition: background 0.3s ease, border-color 0.3s ease;
                                                    }
                                            
                                                    .input-group {
                                                        display: flex;
                                                        gap: 12px;
                                                        align-items: center;
                                                        flex-wrap: wrap;
                                                        margin-bottom: 12px;
                                                    }
                                            
                                                    input[type="text"], input[type="password"], input[type="number"] {
                                                        padding: 12px 16px;
                                                        background: var(--input-bg);
                                                        border: 1px solid var(--input-border);
                                                        border-radius: 10px;
                                                        color: var(--text-main);
                                                        font-size: 14px;
                                                        outline: none;
                                                        transition: all 0.2s ease;
                                                        box-sizing: border-box;
                                                    }
                                            
                                                    input[type="text"]:focus, input[type="password"]:focus, input[type="number"]:focus {
                                                        border-color: var(--primary-blue);
                                                        box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15);
                                                    }
                                            
                                                    input[type="text"], input[type="password"] {
                                                        flex: 1;
                                                        min-width: 180px;
                                                    }
                                            
                                                    .password-wrapper {
                                                        position: relative;
                                                        flex: 1;
                                                        min-width: 180px;
                                                        display: flex;
                                                        align-items: center;
                                                    }
                                            
                                                    .password-wrapper input {
                                                        width: 100%;
                                                    }
                                            
                                                    .toggle-password {
                                                        position: absolute;
                                                        left: 12px;
                                                        background: none;
                                                        border: none;
                                                        cursor: pointer;
                                                        font-size: 16px;
                                                        padding: 0;
                                                        box-shadow: none;
                                                        color: var(--text-secondary);
                                                    }
                                            
                                                    .toggle-password:hover {
                                                        background: none;
                                                        transform: none;
                                                        box-shadow: none;
                                                        color: var(--primary-blue);
                                                    }
                                            
                                                    .config-input {
                                                        width: 70px;
                                                        text-align: center;
                                                    }
                                            
                                                    button {
                                                        padding: 12px 26px;
                                                        background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
                                                        color: #ffffff;
                                                        border: none;
                                                        border-radius: 10px;
                                                        cursor: pointer;
                                                        font-weight: 700;
                                                        font-size: 14px;
                                                        transition: all 0.2s ease;
                                                        box-shadow: 0 4px 12px rgba(2, 132, 199, 0.25);
                                                    }
                                            
                                                    button:hover {
                                                        background: linear-gradient(135deg, #0369a1 0%, #075985 100%);
                                                        transform: translateY(-1px);
                                                        box-shadow: 0 6px 16px rgba(2, 132, 199, 0.35);
                                                    }
                                            
                                                    button.stop-btn {
                                                        background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
                                                        box-shadow: 0 4px 12px rgba(239, 68, 68, 0.2);
                                                    }
                                            
                                                    button.stop-btn:hover {
                                                        background: linear-gradient(135deg, #dc2626 100%, #b91c1c 100%);
                                                        box-shadow: 0 6px 16px rgba(239, 68, 68, 0.3);
                                                    }
                                            
                                                    button.tree-btn {
                                                        background: linear-gradient(135deg, #0d9488 0%, #0f766e 100%);
                                                        box-shadow: 0 4px 12px rgba(13, 148, 136, 0.25);
                                                    }
                                            
                                                    button.tree-btn:hover {
                                                        background: linear-gradient(135deg, #0f766e 100%, #115e59 100%);
                                                    }
                                            
                                                    button.log-toggle-btn {
                                                        background: linear-gradient(135deg, #475569 0%, #334155 100%);
                                                        box-shadow: 0 4px 12px rgba(71, 85, 105, 0.2);
                                                    }
                                            
                                                    button.log-toggle-btn:hover {
                                                        background: linear-gradient(135deg, #334155 100%, #1e293b 100%);
                                                    }
                                            
                                                    button.theme-btn {
                                                        background: linear-gradient(135deg, #475569 0%, #1e293b 100%);
                                                        padding: 8px 16px;
                                                        font-size: 13px;
                                                        box-shadow: 0 2px 8px rgba(0,0,0,0.2);
                                                    }
                                            
                                                    button:disabled {
                                                        background: #cbd5e1 !important;
                                                        color: #94a3b8 !important;
                                                        cursor: not-allowed !important;
                                                        transform: none !important;
                                                        box-shadow: none !important;
                                                    }
                                            
                                                    body.dark-mode button:disabled {
                                                        background: #333333 !important;
                                                        color: #666666 !important;
                                                    }
                                            
                                                    .progress-container {
                                                        width: 100%;
                                                        background: var(--input-border);
                                                        border-radius: 50px;
                                                        margin: 20px 0 10px 0;
                                                        display: none;
                                                        overflow: hidden;
                                                        height: 22px;
                                                    }
                                            
                                                    .progress-bar {
                                                        width: 0%;
                                                        height: 100%;
                                                        background: linear-gradient(90deg, #38bdf8 0%, #0284c7 100%);
                                                        text-align: center;
                                                        line-height: 22px;
                                                        color: #ffffff;
                                                        transition: width 0.3s ease;
                                                        font-size: 12px;
                                                        font-weight: 800;
                                                    }
                                            
                                                    .status-text {
                                                        font-weight: 700;
                                                        color: var(--primary-blue);
                                                        text-align: center;
                                                        margin-top: 10px;
                                                        font-size: 0.95rem;
                                                    }
                                            
                                                    .timer-text {
                                                        font-weight: 600;
                                                        color: var(--text-secondary);
                                                        text-align: center;
                                                        margin-top: 6px;
                                                        font-size: 0.85rem;
                                                    }
                                            
                                                    .info-box {
                                                        background: var(--info-bg);
                                                        border: 1px solid var(--info-border);
                                                        color: var(--info-text);
                                                        padding: 14px 18px;
                                                        border-radius: 12px;
                                                        margin-bottom: 25px;
                                                        font-size: 0.95rem;
                                                        display: flex;
                                                        align-items: center;
                                                        gap: 10px;
                                                        font-weight: 600;
                                                        transition: background 0.3s ease, border-color 0.3s ease, color 0.3s ease;
                                                    }
                                            
                                                    .log-box { 
                                                        background: #0f172a;
                                                        color: #38bdf8;
                                                        padding: 16px;
                                                        border-radius: 10px;
                                                        height: 220px;
                                                        overflow-y: auto;
                                                        font-family: 'Consolas', 'Fira Code', monospace;
                                                        font-size: 12.5px;
                                                        margin-top: 12px;
                                                        text-align: left;
                                                        direction: ltr;
                                                        display: none;
                                                    }
                                            
                                                    .log-info { color: #38bdf8; }
                                                    .log-success { color: #4ade80; font-weight: bold; }
                                                    .log-error { color: #f87171; }
                                            
                                                    .settings-label {
                                                        color: var(--text-secondary);
                                                        font-size: 0.9rem;
                                                        margin-bottom: 8px;
                                                        display: block;
                                                        font-weight: 600;
                                                    }
                                            
                                                    .checkbox-group {
                                                        display: flex;
                                                        align-items: center;
                                                        gap: 8px;
                                                        font-weight: 600;
                                                        color: var(--text-secondary);
                                                        font-size: 0.95rem;
                                                        cursor: pointer;
                                                    }
                                            
                                                    .file-types-box {
                                                        background: var(--input-bg);
                                                        border: 1px solid var(--input-border);
                                                        padding: 14px;
                                                        border-radius: 10px;
                                                        margin-bottom: 12px;
                                                        display: flex;
                                                        gap: 20px;
                                                        flex-wrap: wrap;
                                                        transition: background 0.3s ease, border-color 0.3s ease;
                                                    }
                                                </style>
                                            </head>
                                            <body onbeforeunload="return 'האם אתה בטוח שברצונך לרענן או לעזוב את הדף? תהליכים פעילים עלולים להיעצר.';">
                                            
                                            <div class="container">
                                                <div class="header">
                                                    <div class="theme-toggle-container">
                                                        <button class="theme-btn" onclick="toggleDarkMode()">🌓 מצב לילה / יום</button>
                                                    </div>
                                                    <h2>מערכת העתקת קבצים ועץ שלוחות מתקדמת</h2>
                                                    <p class="subtitle">סריקה מותאמת אישית של קבצים, עצי שלוחות והעתקתם ליעד</p>
                                                </div>
                                            
                                                <div class="info-box">
                                                    ⚡ שלב 1: בחר סוגי קבצים והגדרות סריקה | שלב 2: בחר פעולה (העתקת קבצים/שלוחות או הפקת קובץ עץ שלוחות).
                                                </div>
                                            
                                                <!-- חלק 1: סריקת מערכת מקור -->
                                                <div class="section">
                                                    <h3>1. סריקת קבצים במקור</h3>
                                                    
                                                    <div class="input-group">
                                                        <input type="text" id="srcSystem" placeholder="מספר מערכת מקור">
                                                        <div class="password-wrapper">
                                                            <input type="password" id="srcPassword" placeholder="סיסמת מערכת מקור">
                                                            <button type="button" class="toggle-password" onclick="togglePasswordVisibility('srcPassword', this)">👁️</button>
                                                        </div>
                                                    </div>
                                            
                                                    <div style="margin-top: 15px;">
                                                        <span class="settings-label">בחר אילו סוגי קבצים לכלול בסריקה:</span>
                                                        <div class="file-types-box">
                                                            <label class="checkbox-group"><input type="checkbox" id="extWav" checked> קבצי שמע (WAV)</label>
                                                            <label class="checkbox-group"><input type="checkbox" id="extIni"> הגדרות (INI)</label>
                                                            <label class="checkbox-group"><input type="checkbox" id="extTxt"> טקסט (TXT)</label>
                                                            <label class="checkbox-group"><input type="checkbox" id="extAll"> כל סוגי הקבצים (הכל)</label>
                                                        </div>
                                                    </div>
                                            
                                                    <div style="margin-top: 10px;">
                                                        <span class="settings-label">הגדרות סריקת מקור:</span>
                                                        <div class="input-group" style="margin-bottom: 8px;">
                                                            <input type="text" id="srcStartPath" placeholder="שלוחת התחלה במקור (למשל /1)" value="/" style="max-width: 300px;">
                                                            <span style="color: var(--text-secondary); font-size: 0.9rem;">ספרות לשלוחות:</span>
                                                            <input type="number" id="digitCount" class="config-input" value="2" min="1" max="4">
                                                        </div>
                                                        <label class="checkbox-group" style="color: var(--primary-blue); margin-top: 8px;">
                                                            <input type="checkbox" id="autoScanAll" onchange="toggleDigitInput()">
                                                            סרוק את כל השלוחות באופן אוטומטי (ללא הגבלת מספר ספרות)
                                                        </label>
                                                    </div>
                                            
                                                    <div class="input-group" style="margin-top: 15px;">
                                                        <button id="scanBtn" onclick="startScan()">🔍 התחל סריקת קבצים</button>
                                                        <button id="stopScanBtn" class="stop-btn" onclick="stopScanProcess()" disabled>⏹️ עצור סריקה</button>
                                                    </div>
                                                    <div id="scanStatus" class="status-text"></div>
                                                    <div id="scanTimer" class="timer-text"></div>
                                                </div>
                                            
                                                <!-- חלק 2: פעולות ניהול והעתקה -->
                                                <div class="section">
                                                    <h3>2. ניהול יעד והפקת עץ שלוחות</h3>
                                                    
                                                    <div style="display: flex; flex-direction: column; gap: 10px; margin-bottom: 14px;">
                                                        <label class="checkbox-group">
                                                            <input type="checkbox" id="sameSystemCheck" onchange="toggleSameSystem()">
                                                            מערכת יעד זהה למקור (השתמש באותם נתונים של שלב 1)
                                                        </label>
                                                        <label class="checkbox-group" style="color: var(--primary-blue);">
                                                            <input type="checkbox" id="keepStructureCheck">
                                                            העתק גם שלוחות שלמות (שמור על מבנה התיקיות ותת-התיקיות המקורי ביעד)
                                                        </label>
                                                    </div>
                                            
                                                    <div class="input-group" id="destInputsGroup">
                                                        <input type="text" id="destSystem" placeholder="מספר מערכת יעד">
                                                        <div class="password-wrapper">
                                                            <input type="password" id="destPassword" placeholder="סיסמת מערכת יעד">
                                                            <button type="button" class="toggle-password" onclick="togglePasswordVisibility('destPassword', this)">👁️</button>
                                                        </div>
                                                    </div>
                                            
                                                    <div class="input-group">
                                                        <input type="text" id="destStartPath" placeholder="שלוחת יעד מרכזית (למשל 99)" value="" style="flex: 1;">
                                                    </div>
                                            
                                                    <div class="input-group" style="margin-top: 15px; display: flex; flex-wrap: wrap; gap: 10px;">
                                                        <button id="transferBtn" onclick="startTransfer()">🚀 התחל העתקה</button>
                                                        <button id="stopTransferBtn" class="stop-btn" onclick="stopTransferProcess()" disabled>⏹️ עצור העתקה</button>
                                                        <button id="treeBtn" class="tree-btn" onclick="generateFolderTreeFile()">📄 סרוק והפק עץ שלוחות לקובץ TXT</button>
                                                    </div>
                                            
                                                    <div class="progress-container" id="progCont">
                                                        <div id="progBar" class="progress-bar">0%</div>
                                                    </div>
                                                    <div id="transferStatus" class="status-text"></div>
                                                    <div id="transferTimer" class="timer-text"></div>
                                                </div>
                                            
                                                <!-- יומן בזמן אמת ומתג הצגה -->
                                                <div class="section">
                                                    <div style="display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px;">
                                                        <span style="font-weight: 600; color: var(--text-secondary); font-size: 0.95rem;">יומן מעקב מעודכן (Live Log):</span>
                                                        <div>
                                                            <button id="clearLogBtn" style="background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%); margin-left: 8px;" onclick="clearLog()">🗑️ נקה לוג</button>
                                                            <button id="toggleLogBtn" class="log-toggle-btn" onclick="toggleLog()">👁️ צפה בלוג</button>
                                                        </div>
                                                    </div>
                                                    <div class="log-box" id="logBox">היומן מוכן...</div>
                                                </div>
                                            </div>
                                            
                                            <script>
                                                let isScanCancelled = false;
                                                let isTransferCancelled = false;
                                                let scannedFiles = [];
                                                let activeSrcToken = "";
                                            
                                                function toggleDarkMode() {
                                                    document.body.classList.toggle('dark-mode');
                                                    const isDark = document.body.classList.contains('dark-mode');
                                                    localStorage.setItem('dark_mode_active', isDark ? 'true' : 'false');
                                                }
                                            
                                                // טעינת העדפת מצב לילה שמורה מראש
                                                window.addEventListener('DOMContentLoaded', () => {
                                                    if (localStorage.getItem('dark_mode_active') === 'true') {
                                                        document.body.classList.add('dark-mode');
                                                    }
                                                });
                                            
                                                function togglePasswordVisibility(fieldId, btn) {
                                                    const inputField = document.getElementById(fieldId);
                                                    if (inputField.type === "password") {
                                                        inputField.type = "text";
                                                        btn.innerText = "🙈";
                                                    } else {
                                                        inputField.type = "password";
                                                        btn.innerText = "👁️";
                                                    }
                                                }
                                            
                                                function logMessage(msg, type = 'info') {
                                                    const logBox = document.getElementById('logBox');
                                                    const div = document.createElement('div');
                                                    div.className = `log-${type}`;
                                                    div.innerHTML = `[${new Date().toLocaleTimeString()}] ${msg}`;
                                                    logBox.appendChild(div);
                                                    logBox.scrollTop = logBox.scrollHeight;
                                                }
                                            
                                                function clearLog() {
                                                    const logBox = document.getElementById('logBox');
                                                    logBox.innerHTML = 'היומן נוקה - מוכן לפעולה חדשה...';
                                                    isScanCancelled = false;
                                                    isTransferCancelled = false;
                                                    scannedFiles = [];
                                                    document.getElementById('scanStatus').innerText = "";
                                                    document.getElementById('transferStatus').innerText = "";
                                                    document.getElementById('progBar').style.width = '0%';
                                                    document.getElementById('progBar').innerText = '0%';
                                                    document.getElementById('progCont').style.display = 'none';
                                                    logMessage('המערכת אופסה, ניתן להתחיל מחדש.', 'info');
                                                }
                                            
                                                function toggleLog() {
                                                    const logBox = document.getElementById('logBox');
                                                    const toggleBtn = document.getElementById('toggleLogBtn');
                                                    if (logBox.style.display === 'block') {
                                                        logBox.style.display = 'none';
                                                        toggleBtn.innerText = '👁️ צפה בלוג';
                                                    } else {
                                                        logBox.style.display = 'block';
                                                        toggleBtn.innerText = '🙈 הסתר לוג';
                                                    }
                                                }
                                            
                                                function toggleSameSystem() {
                                                    const isChecked = document.getElementById('sameSystemCheck').checked;
                                                    const destInputsGroup = document.getElementById('destInputsGroup');
                                                    if (isChecked) {
                                                        destInputsGroup.style.display = 'none';
                                                    } else {
                                                        destInputsGroup.style.display = 'flex';
                                                    }
                                                }
                                            
                                                function toggleDigitInput() {
                                                    const isAuto = document.getElementById('autoScanAll').checked;
                                                    const digitInput = document.getElementById('digitCount');
                                                    digitInput.disabled = isAuto;
                                                    if (isAuto) {
                                                        digitInput.style.opacity = '0.5';
                                                    } else {
                                                        digitInput.style.opacity = '1';
                                                    }
                                                }
                                            
                                                function stopScanProcess() {
                                                    isScanCancelled = true;
                                                    document.getElementById('scanStatus').innerText = "עוצר סריקה... נא להמתין לקובץ הנוכחי.";
                                                    document.getElementById('stopScanBtn').disabled = true;
                                                }
                                            
                                                function stopTransferProcess() {
                                                    isTransferCancelled = true;
                                                    document.getElementById('transferStatus').innerText = "עוצר העתקה... נא להמתין לקובץ הנוכחי.";
                                                    document.getElementById('stopTransferBtn').disabled = true;
                                                }
                                            
                                                function formatTimeRemaining(seconds) {
                                                    if (isNaN(seconds) || seconds < 0) return "";
                                                    const mins = Math.floor(seconds / 60);
                                                    const secs = Math.floor(seconds % 60);
                                                    if (mins === 0) return `זמן משוער לסיום: כ-${secs} שניות`;
                                                    return `זמן משוער לסיום: כ-${mins} דקות ו-${secs} שניות`;
                                                }
                                            
                                                async function fetchApiToken(rawUsername, password) {
                                                    const cleanUser = rawUsername.replace(/[^0-9]/g, '');
                                                    logMessage(`מתחבר למערכת: ${cleanUser}...`, 'info');
                                            
                                                    try {
                                                        const loginUrl = `https://www.call2all.co.il/ym/api/Login?username=${encodeURIComponent(cleanUser)}&password=${encodeURIComponent(password)}`;
                                                        const res = await fetch(loginUrl);
                                                        const data = await res.json();
                                                        
                                                        if (data.responseStatus === "OK" && data.token) {
                                                            logMessage(`התחברות הצליחה!`, 'success');
                                                            return data.token;
                                                        }
                                                    } catch (err) {}
                                            
                                                    const directToken = `${cleanUser}:${password}`;
                                                    const testUrl = `https://www.call2all.co.il/ym/api/GetIVR2Dir?token=${encodeURIComponent(directToken)}&path=/`;
                                                    const testRes = await fetch(testUrl);
                                                    const testData = await testRes.json();
                                            
                                                    if (testData.responseStatus === "OK") {
                                                        logMessage(`אימות הצליח באמצעות טוקן ישיר.`, 'success');
                                                        return directToken;
                                                    } else {
                                                        const errorMsg = testData.message || "מספר מערכת או סיסמה שגויים";
                                                        logMessage(`שגיאה מהשרת: ${errorMsg}`, 'error');
                                                        throw new Error(`אימות נכשל עבור מערכת ${cleanUser}: ${errorMsg}`);
                                                    }
                                                }
                                            
                                                function addOrUpdateFile(fileAcc, fileObj) {
                                                    const existing = fileAcc.find(f => f.fullPath === fileObj.fullPath);
                                                    if (!existing) {
                                                        fileAcc.push(fileObj);
                                                    }
                                                }
                                            
                                                function checkFileMatch(fileName, filters) {
                                                    const lowerName = fileName.toLowerCase();
                                                    if (filters.all) return true;
                                                    if (filters.wav && lowerName.endsWith('.wav')) return true;
                                                    if (filters.ini && lowerName.endsWith('.ini')) return true;
                                                    if (filters.txt && lowerName.endsWith('.txt')) return true;
                                                    return false;
                                                }
                                            
                                                async function scanFolderRecursive(token, sPath, rootStartPath, digits, autoAll, filters, fileAcc, statusElement) {
                                                    if (isScanCancelled) return;
                                            
                                                    sPath = sPath.replace(/\/+/g, '/');
                                            
                                                    logMessage(`סורק שלוחה: ${sPath}`, 'info');
                                                    statusElement.innerText = `סורק שלוחה: ${sPath}... (${fileAcc.length} קבצים התואמים להגדרות נמצאו)`;
                                            
                                                    let children = [];
                                            
                                                    try {
                                                        const res = await fetch(`https://www.call2all.co.il/ym/api/GetIVR2Dir?token=${encodeURIComponent(token)}&path=${encodeURIComponent(sPath)}`);
                                                        const data = await res.json();
                                                        if (data.files && Array.isArray(data.files)) {
                                                            children = data.files;
                                                        }
                                                    } catch(e) {}
                                            
                                                    if (!autoAll) {
                                                        const maxRange = Math.pow(10, digits) - 1;
                                                        const subScan = [];
                                                        for (let i = 0; i <= maxRange; i++) {
                                                            const n = i.toString().padStart(digits, '0');
                                                            if (!children.find(c => c.name === n)) {
                                                                const probePath = `${sPath}/${n}/ext.ini`.replace(/\/+/g, '/');
                                                                subScan.push(
                                                                    fetch(`https://www.call2all.co.il/ym/api/GetTextFile?token=${encodeURIComponent(token)}&what=ivr2:${probePath}`)
                                                                    .then(r => r.json())
                                                                    .then(d => { 
                                                                        if (d && d.contents !== undefined) {
                                                                            children.push({ name: n, fileType: "DIR" }); 
                                                                        }
                                                                    })
                                                                    .catch(() => {})
                                                                );
                                                            }
                                                        }
                                                        await Promise.all(subScan);
                                                    } else {
                                                        if (children.length === 0 || !children.some(c => (c.fileType || '').toUpperCase() === "DIR")) {
                                                            const autoScanProbes = [];
                                                            for (let i = 0; i <= 99; i++) {
                                                                const n = i < 10 ? '0' + i : i.toString();
                                                                if (!children.find(c => c.name === n)) {
                                                                    const probePath = `${sPath}/${n}/ext.ini`.replace(/\/+/g, '/');
                                                                    autoScanProbes.push(
                                                                        fetch(`https://www.call2all.co.il/ym/api/GetTextFile?token=${encodeURIComponent(token)}&what=ivr2:${probePath}`)
                                                                        .then(r => r.json())
                                                                        .then(d => { 
                                                                            if (d && d.contents !== undefined) {
                                                                                children.push({ name: n, fileType: "DIR" }); 
                                                                            }
                                                                        })
                                                                        .catch(() => {})
                                                                    );
                                                                }
                                                            }
                                                            await Promise.all(autoScanProbes);
                                                        }
                                                    }
                                            
                                                    for (const f of children) {
                                                        if (isScanCancelled) break;
                                            
                                                        const itemPath = `${sPath}/${f.name}`.replace(/\/+/g, '/');
                                                        const itemType = (f.fileType || '').toUpperCase();
                                                        const isDir = itemType === "DIR" || itemType === "FOLDER" || f.isDir || (!f.name.includes('.') && itemType !== "FILE");
                                            
                                                        if (isDir) {
                                                            await scanFolderRecursive(token, itemPath, rootStartPath, digits, autoAll, filters, fileAcc, statusElement);
                                                        } else {
                                                            if (checkFileMatch(f.name, filters)) {
                                                                logMessage(`נמצא קובץ מתאים: ${itemPath}`, 'success');
                                                                let relativePath = itemPath;
                                                                if (rootStartPath !== '/' && itemPath.startsWith(rootStartPath)) {
                                                                    relativePath = itemPath.substring(rootStartPath.length);
                                                                }
                                                                if (!relativePath.startsWith('/')) relativePath = '/' + relativePath;
                                            
                                                                addOrUpdateFile(fileAcc, {
                                                                    fullPath: itemPath,
                                                                    fileName: f.name,
                                                                    relativePath: relativePath
                                                                });
                                                            }
                                                        }
                                                    }
                                                }
                                            
                                                async function startScan() {
                                                    const srcSys = document.getElementById('srcSystem').value.trim();
                                                    const srcPass = document.getElementById('srcPassword').value.trim();
                                                    let srcStartPath = document.getElementById('srcStartPath').value.trim() || '/';
                                                    const digits = parseInt(document.getElementById('digitCount').value) || 2;
                                                    const autoAll = document.getElementById('autoScanAll').checked;
                                            
                                                    const filters = {
                                                        wav: document.getElementById('extWav').checked,
                                                        ini: document.getElementById('extIni').checked,
                                                        txt: document.getElementById('extTxt').checked,
                                                        all: document.getElementById('extAll').checked
                                                    };
                                            
                                                    if (!srcSys || !srcPass) return alert("נא למלא מספר מערכת מקור וסיסמה!");
                                                    if (!srcStartPath.startsWith('/')) srcStartPath = '/' + srcStartPath;
                                            
                                                    isScanCancelled = false;
                                                    scannedFiles = [];
                                                    
                                                    const scanBtn = document.getElementById('scanBtn');
                                                    const stopScanBtn = document.getElementById('stopScanBtn');
                                                    const status = document.getElementById('scanStatus');
                                                    const timerEl = document.getElementById('scanTimer');
                                            
                                                    scanBtn.disabled = true;
                                                    stopScanBtn.disabled = false;
                                                    status.innerText = "מתחבר למערכת המקור...";
                                                    timerEl.innerText = "";
                                            
                                                    try {
                                                        logMessage("--- התחלת סריקת קבצים מותאמת אישית ---", 'info');
                                                        activeSrcToken = await fetchApiToken(srcSys, srcPass);
                                                        localStorage.setItem('src_token', activeSrcToken);
                                            
                                                        status.innerText = `סורק משלוחת התחלה (${srcStartPath})...`;
                                                        await scanFolderRecursive(activeSrcToken, srcStartPath, srcStartPath, digits, autoAll, filters, scannedFiles, status);
                                            
                                                        if (isScanCancelled) {
                                                            status.innerText = "🛑 הסריקה נעצרה על ידי המשתמש.";
                                                            timerEl.innerText = "";
                                                        } else {
                                                            localStorage.setItem('music_database_files', JSON.stringify(scannedFiles));
                                                            status.innerText = `✅ סריקת הקבצים הושלמה! נמצאו ${scannedFiles.length} קבצים מוכנים להעתקה.`;
                                                            timerEl.innerText = "";
                                                            logMessage(`סריקה הושלמה! ${scannedFiles.length} קבצים נשמרו בזיכרון.`, 'success');
                                                        }
                                            
                                                    } catch (err) {
                                                        alert(err.message);
                                                        status.innerText = "הסריקה הופסקה בשל שגיאה.";
                                                        timerEl.innerText = "";
                                                    } finally {
                                                        scanBtn.disabled = false;
                                                        stopScanBtn.disabled = true;
                                                    }
                                                }
                                            
                                                async function startTransfer() {
                                                    const sameSystem = document.getElementById('sameSystemCheck').checked;
                                                    const keepStructure = document.getElementById('keepStructureCheck').checked;
                                                    let destSys, destPass;
                                            
                                                    if (sameSystem) {
                                                        destSys = document.getElementById('srcSystem').value.trim();
                                                        destPass = document.getElementById('srcPassword').value.trim();
                                                        if (!destSys || !destPass) return alert("נא למלא תחילה את פרטי מערכת המקור בשלב 1.");
                                                    } else {
                                                        destSys = document.getElementById('destSystem').value.trim();
                                                        destPass = document.getElementById('destPassword').value.trim();
                                                        if (!destSys || !destPass) return alert("נא למלא מספר מערכת יעד וסיסמה.");
                                                    }
                                            
                                                    let destStartPath = document.getElementById('destStartPath').value.trim();
                                            
                                                    if (!scannedFiles || scannedFiles.length === 0) {
                                                        scannedFiles = JSON.parse(localStorage.getItem('music_database_files') || '[]');
                                                    }
                                            
                                                    const srcToken = activeSrcToken || localStorage.getItem('src_token');
                                            
                                                    if (!srcToken || scannedFiles.length === 0) {
                                                        return alert("טרם בוצעה סריקה! נא לבצע סריקת קבצים בחלק 1 תחילה.");
                                                    }
                                            
                                                    if (destStartPath && !destStartPath.startsWith('/')) {
                                                        destStartPath = '/' + destStartPath;
                                                    }
                                            
                                                    isTransferCancelled = false;
                                                    const transferBtn = document.getElementById('transferBtn');
                                                    const stopTransferBtn = document.getElementById('stopTransferBtn');
                                                    const status = document.getElementById('transferStatus');
                                                    const timerEl = document.getElementById('transferTimer');
                                                    const progBar = document.getElementById('progBar');
                                            
                                                    transferBtn.disabled = true;
                                                    stopTransferBtn.disabled = false;
                                                    document.getElementById('progCont').style.display = 'block';
                                                    progBar.style.width = '0%';
                                                    progBar.innerText = '0%';
                                            
                                                    status.innerText = "מתחבר למערכת היעד...";
                                                    timerEl.innerText = "";
                                            
                                                    const startTime = Date.now();
                                            
                                                    try {
                                                        logMessage(`--- התחלת העתקת קבצים (שמירת מבנה שלוחות: ${keepStructure ? 'כן' : 'לא'}) ---`, 'info');
                                                        const destToken = sameSystem ? srcToken : await fetchApiToken(destSys, destPass);
                                            
                                                        const totalFiles = scannedFiles.length;
                                            
                                                        for (let i = 0; i < totalFiles; i++) {
                                                            if (isTransferCancelled) {
                                                                status.innerText = "🛑 ההעתקה נעצרה על ידי המשתמש.";
                                                                timerEl.innerText = "";
                                                                break;
                                                            }
                                            
                                                            const item = scannedFiles[i];
                                                            let targetFullPath = "";
                                            
                                                            if (keepStructure) {
                                                                let rel = item.relativePath || `/${item.fileName}`;
                                                                targetFullPath = (destStartPath ? `${destStartPath}${rel}` : rel).replace(/\/+/g, '/');
                                                            } else {
                                                                targetFullPath = (destStartPath ? `${destStartPath}/${item.fileName}` : `/${item.fileName}`).replace(/\/+/g, '/');
                                                            }
                                            
                                                            status.innerText = `מעתיק קובץ (${i + 1}/${totalFiles}): ${targetFullPath}`;
                                                            logMessage(`מעתיק: ${item.fullPath} ➔ ${targetFullPath}`, 'info');
                                            
                                                            const elapsedSeconds = (Date.now() - startTime) / 1000;
                                                            const avgTimePerFile = elapsedSeconds / (i + 1);
                                                            const remainingFiles = totalFiles - (i + 1);
                                                            const estimatedSeconds = remainingFiles * avgTimePerFile;
                                                            timerEl.innerText = formatTimeRemaining(estimatedSeconds);
                                            
                                                            try {
                                                                const downloadUrl = `https://www.call2all.co.il/ym/api/DownloadFile?token=${encodeURIComponent(srcToken)}&path=ivr2:${encodeURIComponent(item.fullPath)}`;
                                                                const downloadRes = await fetch(downloadUrl);
                                                                if (!downloadRes.ok) throw new Error('הורדת קובץ נכשלה');
                                                                const fileBlob = await downloadRes.blob();
                                            
                                                                const formData = new FormData();
                                                                formData.append('token', destToken);
                                                                formData.append('path', `ivr2:${targetFullPath}`);
                                                                formData.append('qqfile', fileBlob, item.fileName);
                                            
                                                                await fetch(`https://www.call2all.co.il/ym/api/UploadFile`, {
                                                                    method: 'POST',
                                                                    body: formData
                                                                });
                                            
                                                            } catch (err) {
                                                                logMessage(`שגיאה בהעתקת ${targetFullPath}: ${err.message}`, 'error');
                                                            }
                                            
                                                            const percent = Math.round(((i + 1) / totalFiles) * 100);
                                                            progBar.style.width = percent + '%';
                                                            progBar.innerText = percent + '%';
                                                        }
                                            
                                                        if (!isTransferCancelled) {
                                                            status.innerText = '✅ כל הקבצים הועתקו בהצלחה לשלוחת היעד!';
                                                            timerEl.innerText = "";
                                                            logMessage('ההעתקה הושלמה בהצלחה!', 'success');
                                                        }
                                            
                                                    } catch (err) {
                                                        alert(err.message);
                                                        status.innerText = "ההעתקה הופסקה בשל שגיאה.";
                                                        timerEl.innerText = "";
                                                    } finally {
                                                        transferBtn.disabled = false;
                                                        stopTransferBtn.disabled = true;
                                                    }
                                                }
                                            
                                                async function generateFolderTreeFile() {
                                                    const srcSys = document.getElementById('srcSystem').value.trim();
                                                    const srcPass = document.getElementById('srcPassword').value.trim();
                                                    let srcStartPath = document.getElementById('srcStartPath').value.trim() || '/';
                                                    const digits = parseInt(document.getElementById('digitCount').value) || 2;
                                                    const autoAll = document.getElementById('autoScanAll').checked;
                                            
                                                    if (!srcSys || !srcPass) return alert("נא למלא מספר מערכת מקור וסיסמה בשלב 1!");
                                                    if (!srcStartPath.startsWith('/')) srcStartPath = '/' + srcStartPath;
                                            
                                                    const status = document.getElementById('transferStatus');
                                                    const treeBtn = document.getElementById('treeBtn');
                                                    treeBtn.disabled = true;
                                                    status.innerText = "מתחיל בסריקת עץ השלוחות ותוכנן למטרת הפקת דוח...";
                                            
                                                    try {
                                                        const token = await fetchApiToken(srcSys, srcPass);
                                                        let treeLines = [];
                                                        treeLines.push(`=== עץ שלוחות מפורט למערכת: ${srcSys} ===`);
                                                        treeLines.push(`תאריך הפקה: ${new Date().toLocaleString()}`);
                                                        treeLines.push(`נקודת התחלה: ${srcStartPath}\n`);
                                            
                                                        async function crawlTree(currentPath, indent = '') {
                                                            currentPath = currentPath.replace(/\/+/g, '/');
                                                            let children = [];
                                            
                                                            try {
                                                                const res = await fetch(`https://www.call2all.co.il/ym/api/GetIVR2Dir?token=${encodeURIComponent(token)}&path=${encodeURIComponent(currentPath)}`);
                                                                const data = await res.json();
                                                                if (data.files && Array.isArray(data.files)) {
                                                                    children = data.files;
                                                                }
                                                            } catch(e) {}
                                            
                                                            if (!autoAll) {
                                                                const maxRange = Math.pow(10, digits) - 1;
                                                                const subScan = [];
                                                                for (let i = 0; i <= maxRange; i++) {
                                                                    const n = i.toString().padStart(digits, '0');
                                                                    if (!children.find(c => c.name === n)) {
                                                                        const probePath = `${currentPath}/${n}/ext.ini`.replace(/\/+/g, '/');
                                                                        subScan.push(
                                                                            fetch(`https://www.call2all.co.il/ym/api/GetTextFile?token=${encodeURIComponent(token)}&what=ivr2:${probePath}`)
                                                                            .then(r => r.json())
                                                                            .then(d => { 
                                                                                if (d && d.contents !== undefined) {
                                                                                    children.push({ name: n, fileType: "DIR" }); 
                                                                                }
                                                                            })
                                                                            .catch(() => {})
                                                                        );
                                                                    }
                                                                }
                                                                await Promise.all(subScan);
                                                            } else {
                                                                if (children.length === 0 || !children.some(c => (c.fileType || '').toUpperCase() === "DIR")) {
                                                                    const autoScanProbes = [];
                                                                    for (let i = 0; i <= 99; i++) {
                                                                        const n = i < 10 ? '0' + i : i.toString();
                                                                        if (!children.find(c => c.name === n)) {
                                                                            const probePath = `${currentPath}/${n}/ext.ini`.replace(/\/+/g, '/');
                                                                            autoScanProbes.push(
                                                                                fetch(`https://www.call2all.co.il/ym/api/GetTextFile?token=${encodeURIComponent(token)}&what=ivr2:${probePath}`)
                                                                                .then(r => r.json())
                                                                                .then(d => { 
                                                                                    if (d && d.contents !== undefined) {
                                                                                        children.push({ name: n, fileType: "DIR" }); 
                                                                                    }
                                                                                })
                                                                                .catch(() => {})
                                                                            );
                                                                        }
                                                                    }
                                                                    await Promise.all(autoScanProbes);
                                                                }
                                                            }
                                            
                                                            const subDirs = children.filter(f => {
                                                                const itemType = (f.fileType || '').toUpperCase();
                                                                return itemType === "DIR" || itemType === "FOLDER" || f.isDir || (!f.name.includes('.') && itemType !== "FILE");
                                                            });
                                            
                                                            subDirs.sort((a, b) => a.name.localeCompare(b.name, undefined, {numeric: true}));
                                            
                                                            for (const dir of subDirs) {
                                                                const dirPath = `${currentPath}/${dir.name}`.replace(/\/+/g, '/');
                                                                
                                                                let folderTitle = "";
                                                                let wavCount = 0;
                                                                let totalFilesCount = 0;
                                                                let isMenu = false;
                                            
                                                                try {
                                                                    const dirRes = await fetch(`https://www.call2all.co.il/ym/api/GetIVR2Dir?token=${encodeURIComponent(token)}&path=${encodeURIComponent(dirPath)}`);
                                                                    const dirData = await dirRes.json();
                                                                    if (dirData.files && Array.isArray(dirData.files)) {
                                                                        totalFilesCount = dirData.files.filter(f => (f.fileType || '').toUpperCase() === "FILE" || f.name.includes('.')).length;
                                                                        wavCount = dirData.files.filter(f => f.name.toLowerCase().endsWith('.wav')).length;
                                                                    }
                                                                } catch(e) {}
                                            
                                                                try {
                                                                    const iniRes = await fetch(`https://www.call2all.co.il/ym/api/GetTextFile?token=${encodeURIComponent(token)}&what=ivr2:${dirPath}/ext.ini`);
                                                                    const iniData = await iniRes.json();
                                                                    if (iniData && iniData.contents) {
                                                                        isMenu = true;
                                                                        const lines = iniData.contents.split('\n');
                                                                        for (const line of lines) {
                                                                            if (line.toLowerCase().startsWith('title=')) {
                                                                                folderTitle = line.substring(6).trim();
                                                                                break;
                                                                            } else if (line.toLowerCase().startsWith('folder_name=')) {
                                                                                folderTitle = line.substring(12).trim();
                                                                                break;
                                                                            }
                                                                        }
                                                                    }
                                                                } catch(e) {}
                                            
                                                                let typeDesc = isMenu ? "תפריט/הגדרות" : "שלוחה רגילה";
                                                                if (wavCount > 0) {
                                                                    typeDesc += ` | ${wavCount} קבצי שמע`;
                                                                } else {
                                                                    typeDesc += ` | ${totalFilesCount} קבצים סה״כ`;
                                                                }
                                            
                                                                const titlePart = folderTitle ? ` - ${folderTitle}` : '';
                                                                treeLines.push(`${indent}📁 שלוחה ${dir.name}${titlePart} [סוג: ${typeDesc}]`);
                                                                logMessage(`נסרקה שלוחה לעץ: ${dirPath} (${folderTitle || 'ללא שם'})`, 'info');
                                            
                                                                await crawlTree(dirPath, indent + '    ');
                                                            }
                                                        }
                                            
                                                        await crawlTree(srcStartPath);
                                            
                                                        const fileContent = treeLines.join('\n');
                                                        const blob = new Blob([fileContent], { type: 'text/plain;charset=utf-8' });
                                                        const url = URL.createObjectURL(blob);
                                                        const a = document.createElement('a');
                                                        a.href = url;
                                                        a.download = `DetailedFolderTree_${srcSys}.txt`;
                                                        document.body.appendChild(a);
                                                        a.click();
                                                        document.body.removeChild(a);
                                                        URL.revokeObjectURL(url);
                                            
                                                        status.innerText = "✅ עץ השלוחות המפורט הופק והורד לקובץ TXT!";
                                                        logMessage("עץ השלוחות המפורט הופק בהצלחה.", 'success');
                                            
                                                    } catch (err) {
                                                        alert(err.message);
                                                        status.innerText = "הפקת עץ השלוחות נכשלה.";
                                                    } finally {
                                                        treeBtn.disabled = false;
                                                    }
                                                }
                                            </script>
                                            
                                            </body>
                                            </html>
                                            

                                            שיהיה בהצלחה ואשמח לשמוע אם שלי (התוספות שהוספתי הועילו למישהו

                                            א תגובה 1 תגובה אחרונה תגובה ציטוט 0

                                            שלום! נראה שהשיחה הזו מעניינת אותך, אבל עדיין אין לך חשבון.

                                            נמאס לכם לגלול בין אותם הפוסטים בכל ביקור? כשנרשמים לחשבון, תמיד תחזרו בדיוק למקום שבו הייתם קודם, ותוכלו לבחור לקבל התראות על תגובות חדשות (בין אם במייל, ובין אם בהתראת פוש). תוכלו גם לשמור סימניות ולפרגן ב-upvote לפוסטים כדי להביע הערכה לחברי קהילה אחרים.

                                            בעזרת התרומה שלך, הפוסט הזה יכול להיות אפילו טוב יותר 💗

                                            הרשמה התחברות
                                            • פוסט ראשון
                                              פוסט אחרון