Just make my script to send files to a .ftp
folder and it's working well, follow bellow:
@echo off & SetLocal
( echo open ftp.xxxxx.com.it
echo username
echo password
echo put %userprofile%\Desktop\%date:/=-%.zip
echo bye
)> %temp%\ftpsend.dat
ftp -s:%temp%/ftpsend.dat
del /f /s /q %temp%\ftpsend.dat
pause
But using %userprofile%
it can't set the user. My computer username is !Karen Dallalibera!
maybe is beacause the !
in the username....but don't haveDelayExpansion
, so i don't know.
I want use %userprofile%
, %homepath%
, etc.
There's a way to use it?
Got it, using "
. But there's another problem: I want upload the file into a especific folder, i tried as below:
@echo off & SetLocal
( echo open ftp.xxxxx.com.it
echo username
echo password
cd \Karen D.\Test\
echo put "%userprofile%\Desktop\%date:/=-%.zip"
echo bye
)> %temp%\ftpsend.dat
ftp -s:%temp%/ftpsend.dat
del /f /s /q %temp%\ftpsend.dat
pause
I wanted to upload the files to the folder \Karen D.\Test\
But the script is saving on the main folder of the ftp
.
How can i set the specific folder for uploading?