FTP-Batch: eine Datei zu mehreren Servern uploaden

German support forum

Moderators: Hacker, Stefan2, white

Post Reply
Hemingway
Junior Member
Junior Member
Posts: 71
Joined: 2009-05-08, 14:38 UTC
Location: Niederrhein

FTP-Batch: eine Datei zu mehreren Servern uploaden

Post by *Hemingway »

Mein "Problem" ist ein winziges. Die Lösung dient allein meiner Bequemlichkeit (immerhin vielleicht auch der manch anderer User):
Alle paar Tage muss ich ein (1) htm-file auf vier verschiedenen Servern aktualisieren, also uploaden. Also Strg-F - Server1 - "Überschreiben" bestätigen - neue Verbindung usw. - und das Ganze vier Mal.
Gibt es eine Möglichkeit (ähnlich Download-Batch), das zu automatisieren? Also so:
1. Server: anmelden, uploaden/überschreiben, abmelden
2. Server: anmelden, uploaden/überschreiben, abmelden
usw.?
Alle erforderlichen Daten liegen in wcx_ftp.ini bereits vor.
Vielen Dank für jede Auskunft!
User avatar
Dalai
Power Member
Power Member
Posts: 9945
Joined: 2005-01-28, 22:17 UTC
Location: Meiningen (Südthüringen)

Post by *Dalai »

Für sowas fällt mir nur wput ein, die Gegenrichtung von wget. Ob's das auch für Windows gibt, weiß ich nicht. Und eine Batch muss da natürlich auch noch drumrum programmiert werden. Den TC kannst du per AutoIt oder AutoHotkey steuern, aber auch da musst du erstmal ein Skript zusammenbasteln, was deine gewünschte Funktionalität erfüllt.

MfG Dalai
#101164 Personal licence
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64

Plugins: Services2, Startups, CertificateInfo, SignatureInfo, LineBreakInfo - Download-Mirror
User avatar
white
Power Member
Power Member
Posts: 5747
Joined: 2003-11-19, 08:16 UTC
Location: Netherlands

Re: FTP-Batch: eine Datei zu mehreren Servern uploaden

Post by *white »

Hemingway wrote: Gibt es eine Möglichkeit (ähnlich Download-Batch), das zu automatisieren?
Ja, aber Sie müssen einmal Alle überschreiben klicken.
User avatar
white
Power Member
Power Member
Posts: 5747
Joined: 2003-11-19, 08:16 UTC
Location: Netherlands

Post by *white »

Mein Deutsch ist sehr schlecht (Ich verwende eine Online-Übersetzer). So ich habe es im Englischen Zahl geschrieben.
Kann jemand das für mich übersetzen?
You can achieve this by using the following steps:

Preferably use TC 7.50 and encrypt the passwords of the ftp connections.
  1. Create a download list using the option Download later (add to download list)
    • In one panel open the local folder containing the source file/folder
    • In the other panel open one of the ftp connections
    • On the server navigate to the file/folder which needs to be updated
    • Select the file/folder which needs to be updated
    • Click the "F5 Copy" button
    • Check the option Download later (add to download list) and click the OK button
    • Enter a file name for the download list, check the option Save destination dir in list file and click the OK button
    • Repeat above steps for the other servers. (Use the same file name for the download list for all servers)
  2. Change the download list into an upload list
    • Open the download list in a text editor
    • Switch remote file and local file and insert "put:" at the beginning of each line. So
      ftp://user@server/file -> c:\folder\file
      becomes
      put:c:\folder\file -> ftp://user@server/file

      Do the same for folders and append a backslash to the local folder name. The slash at the end of the remote file may be removed.
      ftp://user@server/folder/ -> c:\folder
      becomes
      put:c:\folder\ -> ftp://user@server/folder/
      or
      put:c:\folder\ -> ftp://user@server/folder
    • Add ":<password>" after the user name. So
      put:c:\folder\file -> ftp://user@server/file
      becomes
      put:c:\folder\file -> ftp://user:<password>@server/file
      When TC 7.50+ is used and encrypted passwords, the encrypted password is already there.
  3. Make the upload list read only
    This makes sure the upload list is not changed and can be used again the next time.
    Instead of making the upload list read only, you can also make a copy of the upload list each time you are going to use it.
  4. Use the function FTP Download From List to process the upload list
Post Reply