Ftp Senkronizasyonu

  1. KısayolKısayol reportŞikayet pmÖzel Mesaj
    Fikibok
    KaptaN
    KaptaN's avatar
    Üstün Hizmet Madalyası
    Kayıt Tarihi: 30/Ağustos/2005
    Erkek

    merhaba arkadaşlar özel bir durumdan dolayı ftp yi  her 1 dakikada senkronize etmem gerekiyor daha doğrusu dosyaları alıp silmem gerekiyor winspc ile yerel klasörler güncel tutulsun dediğimde dosyaşarı alıyor ama kaynağı temizlemiyor nasıl yapabilirm

  2. KısayolKısayol reportŞikayet pmÖzel Mesaj
    2021 Talihlisi
    dcpromo
    dcpromo's avatar
    Kayıt Tarihi: 05/Nisan/2017
    Erkek

    çok bir bilgim yok ama okuma yazma izinlerini kontrol ettin mi?

     

    dcpromo tarafından 01/Ağu/18 08:36 tarihinde düzenlenmiştir

    next next next install
  3. KısayolKısayol reportŞikayet pmÖzel Mesaj
    Fikibok
    KaptaN
    KaptaN's avatar
    Üstün Hizmet Madalyası
    Kayıt Tarihi: 30/Ağustos/2005
    Erkek
    ilteris bunu yazdı

    çok bir bilgim yok ama okuma yazma izinlerini kontrol ettin mi?

     

    hocam izinle alakalı degil uygulamada öyle bi özellik yok ondan dolayı 

  4. KısayolKısayol reportŞikayet pmÖzel Mesaj
    camarade
    ontedi
    ontedi's avatar
    Kayıt Tarihi: 04/Eylül/2005
    Erkek

    Aklıma ilk gelen şey şu, Yandex Disk veya Google Drive kurup hedefi de ftpdeki klasör olarak gösterirsen değişiklik olduğu an itibariyle buluta da otomatik atmış olur. Silme işlemi için aklıma gelirse yazaım.


    Matematikçi ve Yazılımcı. http://www.ontedi.com ve http://www.cizgi.site Siteme beklerim herkesi.
  5. KısayolKısayol reportŞikayet pmÖzel Mesaj
    Fikibok
    KaptaN
    KaptaN's avatar
    Üstün Hizmet Madalyası
    Kayıt Tarihi: 30/Ağustos/2005
    Erkek
    ontedi bunu yazdı

    Aklıma ilk gelen şey şu, Yandex Disk veya Google Drive kurup hedefi de ftpdeki klasör olarak gösterirsen değişiklik olduğu an itibariyle buluta da otomatik atmış olur. Silme işlemi için aklıma gelirse yazaım.

    klasör ana rootun içinde oldugundan yandex gdrive filan görmüyor hocam belki farklı bir yazılımla olabilir . 

  6. KısayolKısayol reportŞikayet pmÖzel Mesaj
    majestiquo
    majestiquo's avatar
    Kayıt Tarihi: 24/Eylül/2005
    Erkek

    https://winscp.net/eng/docs/scripting

    https://stackoverflow.com/questions/38616995/delete-files-older-than-x-days-from-ftp-server-with-powershell-or-batch-file  dosya silmek için

    Script yazıp halletmen gerekiyor hocam. İnternette benzer scriptleri bulabilirsin.

  7. KısayolKısayol reportŞikayet pmÖzel Mesaj
    Fikibok
    KaptaN
    KaptaN's avatar
    Üstün Hizmet Madalyası
    Kayıt Tarihi: 30/Ağustos/2005
    Erkek

    şunu düzenleyebilsem sorun kalkacak orytalıkta 

    bu alıyor kopyalıyor bide istersen yerel klasörü temizliyor 

     

    # @name &Keep Local Directory up to Date...
    # @command powershell.exe -ExecutionPolicy Bypass -File "%EXTENSION_PATH%" -sessionUrl "!S" -localPath "%LocalPath%" -remotePath "%RemotePath%" %Delete% %Beep% %ContinueOnError% -interval "%Interval%" -pause -sessionLogPath "%SessionLogPath%"
    # @description Periodically scans for changes in a remote directory and reflects them on a local directory
    # @version 4
    # @homepage https://winscp.net/eng/docs/library_example_keep_local_directory_up_to_date
    # @require WinSCP 5.9.2
    # @option - -run group "Directories"
    # @option RemotePath -run textbox "&Watch for changes in the remote directory:" "!/"
    # @option LocalPath -run textbox "... &and automatically reflect them on the local directory:" "!\"
    # @option - -config -run group "Options"
    # @option Delete -config -run checkbox "&Delete files" "" -delete
    # @option Beep -config -run checkbox "&Beep on change" "" -beep
    # @option ContinueOnError -config -run checkbox "Continue on &error" "" -continueOnError
    # @option Interval -config -run textbox "&Interval (in seconds):" "30"
    # @option - -config group "Logging"
    # @option SessionLogPath -config sessionlogfile
    # @optionspage https://winscp.net/eng/docs/library_example_keep_local_directory_up_to_date#options

    param (
    # Use Generate Session URL function to obtain a value for -sessionUrl parameter.
    $sessionUrl = "sftp://user:mypassword;fingerprint=ssh-rsa-xx-xx-xx@example.com/",
    [Parameter(Mandatory = $True)]
    $localPath,
    [Parameter(Mandatory = $True)]
    $remotePath,
    [Switch]
    $delete,
    [Switch]
    $beep,
    [Switch]
    $continueOnError,
    $sessionLogPath = $Null,
    $interval = 30,
    [Switch]
    $pause
    )

    try
    {
    # Load WinSCP .NET assembly
    $assemblyPath = if ($env:WINSCP_PATH) { $env:WINSCP_PATH } else { $PSScriptRoot }
    Add-Type -Path (Join-Path $assemblyPath "WinSCPnet.dll")

    # Setup session options
    $sessionOptions = New-Object WinSCP.SessionOptions
    $sessionOptions.ParseUrl($sessionUrl)

    $session = New-Object WinSCP.Session

    # Optimization
    # (do not waste time enumerating files, if you do not need to scan for deleted files)
    if ($delete)
    {
    $localFiles = Get-ChildItem -Recurse -Path $localPath
    }

    try
    {
    $session.SessionLogPath = $sessionLogPath

    Write-Host "Connecting..."
    $session.Open($sessionOptions)

    while ($True)
    {
    Write-Host "Synchronizing changes..."
    $result =
    $session.SynchronizeDirectories(
    [WinSCP.SynchronizationMode]::Local, $localPath, $remotePath, $delete)

    $changed = $False

    if (!$result.IsSuccess)
    {
    if ($continueOnError)
    {
    Write-Host "Error: $($result.Failures[0].Message)"
    $changed = $True
    }
    else
    {
    $result.Check()
    }
    }

    # Print updated files
    foreach ($download in $result.Downloads)
    {
    Write-Host "$($download.Destination) <= $($download.FileName)"
    $changed = $True
    }

    if ($delete)
    {
    # scan for removed local files (the $result does not include them)
    $localFiles2 = Get-ChildItem -Recurse -Path $localPath

    if ($localFiles)
    {
    $changes =
    Compare-Object -DifferenceObject $localFiles2 `
    -ReferenceObject $localFiles

    $removedFiles =
    $changes |
    Where-Object -FilterScript { $_.SideIndicator -eq "<=" } |
    Select-Object -ExpandProperty InputObject

    # Print removed local files
    foreach ($removedFile in $removedFiles)
    {
    Write-Host "$removedFile deleted"
    $changed = $True
    }
    }

    $localFiles = $localFiles2
    }

    if ($changed)
    {
    if ($beep)
    {
    [System.Console]::Beep()
    }
    }
    else
    {
    Write-Host "No change."
    }

    Write-Host "Waiting for $interval seconds, press Ctrl+C to abort..."
    $wait = [int]$interval
    # Wait for 1 second in a loop, to make the waiting breakable
    while ($wait -gt 0)
    {
    Start-Sleep -Seconds 1
    $wait--
    }

    Write-Host
    }
    }
    finally
    {
    Write-Host "Disconnecting..."
    # Disconnect, clean up
    $session.Dispose()
    }
    }
    catch
    {
    Write-Host "Error: $($_.Exception.Message)"
    }

    # Pause if -pause switch was used
    if ($pause)
    {
    Write-Host "Press any key to exit..."
    [System.Console]::ReadKey() | Out-Null
    }

    # Never exits cleanly
    exit 1

  8. KısayolKısayol reportŞikayet pmÖzel Mesaj
    trooper
    trooper's avatar
    Kayıt Tarihi: 11/Kasım/2007
    Erkek

    https://fullsync.sourceforge.io bi ara bi işte kullanmıştım bi dene istersen


    ZzZzZzZ...!
Toplam Hit: 1304 Toplam Mesaj: 8
ftp