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

    העברת קבצים ממערכת למערכת

    מתוזמן נעוץ נעול הועבר עזרה הדדית למשתמשים מתקדמים
    15 פוסטים 5 כותבים 188 צפיות 3 עוקבים
    טוען פוסטים נוספים
    • מהישן לחדש
    • מהחדש לישן
    • הכי הרבה הצבעות
    תגובה
    • תגובה כנושא
    התחברו כדי לפרסם תגובה
    נושא זה נמחק. רק משתמשים עם הרשאות מתאימות יוכלו לצפות בו.
    • מ מנותק
      מה @אA
      נערך לאחרונה על ידי

      @אA

      קודם כל: תודה על זה ועל כל השרשור של הקודים. - זה מאוד שימושי בשבילי

      לענינינו:
      בינתיים אין לחצן הפעלה
      17d84443-fd57-4152-9caf-7015d6625b7b-image.png

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

        @מה אפשר באתר של LIY
        https://ym.liy.ovh/manager/

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

          @זאביק

          כבר ניסיתי המון פעמים ולא הצליח.
          (ניסיתי באתר החדש שלו https://ysm.liy.ovh/)

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

            @מה זה נשמע שיש בעיה כלשהי אצלך, תנסה לבצע העתקה שוב עם קוסמוס,
            תוך שימת לב למדריך הזה

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

              @מה בכוונה הבאתי לך את האתר הישן שלו...
              שם זה עובד מצויין...

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

                @זאביק כתב בהעברת קבצים ממערכת למערכת:

                @מה בכוונה הבאתי לך את האתר הישן שלו...
                שם זה עובד מצויין..

                אכן עובד מצוין ומהיר.

                אבל אין אצלו אפשרות להעתיק תת שלוחות,
                אפשר להעתיק רק את הקבצים מהשלוחה ללא השלוחות שתחתיו.

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

                  @אA כתב בהעברת קבצים ממערכת למערכת:

                  עריכה: כרגע יתכן לא עובד, אני אשב ע"ז בהמשך לסדר את זה

                  מחכים בכליון עיניים.

                  אגב זה יעביר גם שלוחות בתוך שלוחות או רק קבצים ?

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

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

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

                      @מה
                      בדקתי והקוד הזה עובד.
                      בהצלחה!
                      אם תרצה תוספות תעדכן.


                      <!DOCTYPE html>
                      <html lang="he" dir="rtl">
                      <head>
                      <meta charset="UTF-8">
                      <title>מעביר קבצים - ימות המשיח</title>
                      <style>
                      body { font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; margin: 20px; background-color: #f4f7f6; color: #333; text-align: right; }
                      .container { max-width: 900px; margin: auto; background: white; padding: 20px; border-radius: 10px; box-shadow: 0 2px 10px rgba(0,0,0,0.1); }
                      .section { border: 1px solid #e0e0e0; padding: 15px; margin-bottom: 15px; border-radius: 8px; background: #fafafa; }
                      h2 { color: #2c3e50; border-bottom: 2px solid #3498db; padding-bottom: 10px; margin-top: 0; }
                      .input-group { margin-bottom: 10px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
                      input[type="text"] { padding: 8px; border: 1px solid #ddd; border-radius: 4px; flex: 1; min-width: 200px; }
                      button { padding: 10px 20px; background-color: #3498db; color: white; border: none; border-radius: 4px; cursor: pointer; font-weight: bold; }
                      button:hover { background-color: #2980b9; }
                      button:disabled { background-color: #bdc3c7; cursor: not-allowed; }

                          table { width: 100%; border-collapse: collapse; margin-top: 15px; }
                          th, td { border: 1px solid #ddd; padding: 10px; text-align: center; }
                          th { background-color: #ecf0f1; }
                          
                          .progress-container { width: 100%; background-color: #eee; border-radius: 13px; margin: 15px 0; display: none; overflow: hidden; height: 25px; }
                          .progress-bar { width: 0%; height: 100%; background-color: #2ecc71; text-align: center; line-height: 25px; color: white; transition: width 0.3s; }
                          .status-text { font-weight: bold; color: #e67e22; text-align: center; margin-top: 5px; }
                          .file-list-section { margin-top: 20px; border-top: 2px solid #eee; padding-top: 20px; }
                      </style>
                      

                      </head>
                      <body>

                      <div class="container">
                      <h2>מערכת העברת קבצים אוטומטית</h2>

                      <div class="section">
                          <strong>מערכת מקור</strong>
                          <div class="input-group">
                              <input type="text" id="srcToken" placeholder="טוקן מקור">
                              <input type="text" id="srcPath" placeholder="שלוחה מקור (למשל 1)">
                              <button id="loadBtn" onclick="loadFiles()">טען קבצים</button>
                          </div>
                      </div>
                      
                      <div class="section">
                          <strong>מערכת יעד</strong>
                          <div class="input-group">
                              <input type="text" id="destToken" placeholder="טוקן יעד">
                              <input type="text" id="destPath" placeholder="שלוחת יעד (למשל 2)">
                              <button id="transferBtn" onclick="startTransfer()" disabled>התחל העברה</button>
                          </div>
                      
                          <div class="progress-container" id="progCont">
                              <div class="progress-bar" id="progBar">0%</div>
                          </div>
                          <div id="transferStatus" class="status-text"></div>
                      </div>
                      
                      <div id="fileArea" class="file-list-section" style="display:none;">
                          <h3>קבצים בשלוחת המקור</h3>
                          <table>
                              <thead>
                                  <tr>
                                      <th><input type="checkbox" id="selectAll" onclick="toggleSelectAll(this)"></th>
                                      <th>שם הקובץ</th>
                                      <th>גודל</th>
                                  </tr>
                              </thead>
                              <tbody id="fileTableBody"></tbody>
                          </table>
                      </div>
                      

                      </div>

                      <script>
                      function toggleSelectAll(source) {
                      const checkboxes = document.querySelectorAll('.file-check');
                      checkboxes.forEach(cb => cb.checked = source.checked);
                      }

                      async function loadFiles() {
                          const token = document.getElementById('srcToken').value;
                          const path = document.getElementById('srcPath').value;
                          const loadBtn = document.getElementById('loadBtn');
                          const tbody = document.getElementById('fileTableBody');
                          
                          if(!token || !path) return alert("נא למלא טוקן ונתיב מקור");
                      
                          loadBtn.innerText = "טוען...";
                          loadBtn.disabled = true;
                      
                          try {
                              const response = await fetch(`https://www.call2all.co.il/ym/api/GetIVR2Dir?token=${token}&path=${path}`);
                              const data = await response.json();
                      
                              if (data.responseStatus !== "OK") throw new Error(data.message);
                      
                              tbody.innerHTML = '';
                              if (data.files && data.files.length > 0) {
                                  data.files.forEach(file => {
                                      tbody.innerHTML += `<tr>
                                          <td><input type="checkbox" class="file-check" data-name="${file.name}"></td>
                                          <td>${file.name}</td>
                                          <td>${(file.size / 1024).toFixed(1)} KB</td>
                                      </tr>`;
                                  });
                                  document.getElementById('fileArea').style.display = 'block';
                                  document.getElementById('transferBtn').disabled = false;
                              } else {
                                  alert("לא נמצאו קבצים בשלוחה זו.");
                              }
                          } catch (e) { 
                              alert("שגיאה: " + e.message); 
                          } finally {
                              loadBtn.innerText = "טען קבצים";
                              loadBtn.disabled = false;
                          }
                      }
                      
                      async function startTransfer() {
                          const srcToken = document.getElementById('srcToken').value;
                          const srcPath = document.getElementById('srcPath').value;
                          const destToken = document.getElementById('destToken').value;
                          const destPath = document.getElementById('destPath').value;
                          const selected = Array.from(document.querySelectorAll('.file-check:checked'));
                      
                          if (selected.length === 0) return alert('נא לבחור קבצים להעברה');
                      
                          const status = document.getElementById('transferStatus');
                          const progBar = document.getElementById('progBar');
                          document.getElementById('progCont').style.display = 'block';
                          document.getElementById('transferBtn').disabled = true;
                      
                          for (let i = 0; i < selected.length; i++) {
                              const fileName = selected[i].getAttribute('data-name');
                              status.innerText = `מעביר: ${fileName} (${i + 1}/${selected.length})`;
                      
                              try {
                                  // הורדה
                                  const downloadUrl = `https://www.call2all.co.il/ym/api/DownloadFile?token=${srcToken}&path=ivr2:${srcPath}/${fileName}`;
                                  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:${destPath}/${fileName}`);
                                  formData.append('qqfile', fileBlob, fileName);
                      
                                  const uploadRes = await fetch(`https://www.call2all.co.il/ym/api/UploadFile`, {
                                      method: 'POST',
                                      body: formData
                                  });
                                  await uploadRes.json();
                      
                              } catch (err) {
                                  console.error("תקלה:", err);
                                  status.innerText = `שגיאה בקובץ ${fileName}, ממשיך...`;
                              }
                      
                              const percent = Math.round(((i + 1) / selected.length) * 100);
                              progBar.style.width = percent + '%';
                              progBar.innerText = percent + '%';
                          }
                      
                          status.innerText = 'ההעברה הושלמה בהצלחה!';
                          document.getElementById('transferBtn').disabled = false;
                      }
                      

                      </script>
                      </body>
                      </html>

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

                        @אA כתב בהעברת קבצים ממערכת למערכת:

                        Spoiler

                        תגובה

                        תודה!

                        רק אני רוצה שיעביר גם את השלוחות הנמצאות בתוך השלוחה.
                        לדוגמה שכשמעבירים שלוחה 1 יעביר את כל הקבצים והשלוחות הנמצאים תחת שלוחה 1

                        בדוגמה רואים שטוען רק את הקבצים הנמצאים בשלוחה, ולא את השלוחות שנמצאים בשלוחה
                        8cfaae0e-14db-4f42-9a89-b0816380096d-image.png

                        ושוב תודה תודה...

                        תגובה 1 תגובה אחרונה תגובה ציטוט 0
                        • פוסט ראשון
                          פוסט אחרון