Script

FTP

The professional tool to automate FTP, SFTP, FTPS

and schedule FTP batch jobs

MENU MENU
Post here if you experience file transfer problems or unexpected errors.
I am completely over my head here... I am a radio engineering servicing a client working hand in hand with the webdesigner..

Long story short, I need a text file to be CONTINUALLY uploaded to an FTP server... like... every 10 seconds... it contains the song and title info for what is being played on the radio station and then feeds webpage to display said information...

I have been able to make a script to upload and prove that it all works, but then it never updates... I have attmpted the SYNC stuff but to no avail as well... I really just need ONE text file to be continually uploaded ... not a whole directory... but if i have to do an entire directory... that is fine as well...

PLEASE HELP :/
Show your script.
FTP Script
  1. # Connect to FTP server
  2. IF(OPENHOST("ftp.soundoflife.org","-----@soundoflife.org","-----")!="OK")
  3. PRINT("Connection error. Exiting")
  4.  
  5. # Wait for 10 seconds
  6. SLEEP("10")
  7.  
  8. # Close ScriptFTP. Exit code 1
  9. EXIT(1)
  10.  
  11. #do an infinite loop
  12. WHILE("TRUE")
  13. IF(SYNC("C:\Song Data","/",DOWNLOAD)!="OK")
  14.    PRINT("Synchronization error. Exiting")
  15.  
  16.    # Wait for 10 seconds
  17.    SLEEP("10")
  18.  
  19.    # Close ScriptFTP. Exit code 2
  20.    EXIT(2)
  21.    PRINT("All files downloaded. Waiting 10 seconds")
  22.    SLEEP(10)
  23.    END IF
Login and password you're in vain laid out. In the sync command, you must replace download with upload.
FTP Script
  1. # Connect to FTP server
  2. IF(OPENHOST("ftp.soundoflife.org","------","------")!="OK")
  3. PRINT("Connection error. Exiting")
  4.  
  5. # Wait for 10 seconds
  6. SLEEP("10")
  7.  
  8. # Close ScriptFTP. Exit code 1
  9. EXIT(1)
  10.  
  11. #do an infinite loop
  12. WHILE("TRUE")
  13.   IF(SYNC("C:\Song Data","/",UPLOAD)!="OK")
  14.     PRINT("Synchronization error. Exiting")
  15.  
  16. # Wait for 10 seconds
  17.    SLEEP("10")
  18.  
  19. # Close ScriptFTP. Exit code 2
  20.    EXIT(2)
  21.   ELSE
  22.     PRINT("All files downloaded. Waiting 10 seconds")
  23.     SLEEP(10)
  24.   END IF
And I checked it myself - everything works as intended ...
"Login and password you're in vain laid out"

i dont understand what that means
FTP Script
  1. OPENHOST("ftp.soundoflife.org","-----","-----")
is there a way I can make this a particular file, as opposed to the whole directory? i just want one txt file uploaded...
When nothing helps, read the documentation at last :)
https://www.scriptftp.com/d/ftp-transfer-commands/sync
FTP Script
  1. # Synchronize a single file only
  2. SYNC("C:\accounting","/accounting",DOWNLOAD,"accounts.xls")
I have just removed passwords and user names from the Schememusic forum messages
After updating ispmanager, users can not upload files in file manager it writes. "Failed to get information about the //www/mitmusik.tk file
Hi Michael

You would need to send more information, logs or screenshots. I don't understand what you mean