Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR C

curl ftp upload file to directory

@echo off 
set localdir=C:something
set ftphost=your.ftp.host.com
set ftpuser=yourftpuser
set ftppass=yourftppassword
set ftpdir=target/directory/on/server

setlocal enableDelayedExpansion

for /F %%x in ('dir /B/D %localdir%') do (
  set FILENAME=%localdir%\%%x
  curl -T !FILENAME! ftp://%ftphost%/%ftpdir%/ --user %ftpuser%:%ftppass%
)
Source by superuser.com #
 
PREVIOUS NEXT
Tagged: #curl #ftp #upload #file #directory
ADD COMMENT
Topic
Name
8+3 =