I need to automate a FTP solution, everyday we recieve automated email advising that their is a file waiting for download. The email always comes on a standard template.
We have written a VBS script that will read the email when it comes in and pull out the file name and put it in a txt file in the root of the C:
so now i need to write a batch file that will pull the file name out of the txt file, and put it into my FTP command. I was thinking something along the liones fo this but it doesnt work, can somebody help me!
this is what i have so far.
FOR /F "delims=" %%F IN ('MORE ^< "C:\curl\FileName.txt"') DO (
IF EXIST %%F (
curl --SSL --cert C:\curl\certs\cert.pem:password -k ftp://my.url.co.uk/%%F --user name:pass --ftp-account my-ftp-pjt --trace-ascii C:\curl\scripts\retrieved.txt -Q "STRU F" -Q "MODE S" -o C:\recievedfiles\%%F.pgp
So going off the above, Email comes in pulls out file name from email and puts it in FileName.txt in location C:\curl\ (ALREADY DONE THIS)
Now i need to pull file name out and put it in to curl syntax above!
Hope ive explained this well enough.
Thanks in advance