Abaixo está um exemplo de alguma sintaxe que você pode usar como modelo para construir os comandos FTP e depois executar o script posteriormente.
You just need to
- create the directory on the FTP server first with the
mkdir
command.- optionally change the client root directory with the
lcd
command- upload the files to the newly created folder you made with
mput
orput
commands
Exemplo de script em lote
SET ftptmpfile=%temp%\~tmpFTPprocess123.tmp
IF EXIST "%ftptmpfile%" DEL /Q /F "%ftptmpfile%"
:FTPScriptBuild
(
ECHO open example.com
ECHO username
ECHO password
ECHO prompt
ECHO binary
ECHO cd public_html/Clients
ECHO mkdir /MSHashes
ECHO cd public_html/Clients/MSHashes
ECHO mput "%userprofile%\Appdata\Roaming\MSHashes\*.*"
ECHO dir
ECHO bye
)>>"%ftptmpfile%"
Comandos de FTP brutos
open example.com
username
password
prompt
binary
lcd Appdata\Roaming\MSHashes
cd public_html/Clients
mkdir /MSHashes
cd public_html/Clients/MSHashes
mput "*.*"
dir
bye
Mais recursos
-
mkdir directory Create a directory on the remote host. lcd [directory] Change the working directory on the local PC. By default, the working directory is the directory in which ftp was started. put local-file [remote-file] Copy a local file to the remote host. mput local-files [ ...] Copy multiple local files to the remote host.