|
Answer» I'm trying to make an FTP updater using a batch file so I use two files; one the script, and one the batch file that runs it.
ftp.bat Code: [Select]ftp -i -s:"script.bat" script.bat Code: [Select]open FTP.SITE USERNAME PASSWORD
Using the LCD command in ftp, you can change the working directory on the local computer as far as I know. I want to know if it is possible for the directory you enter after LCD to be a variable. EX: %location%
I want to do something like this for the script.bat: Code: [Select]open FTP.SITE USERNAME PASSWORD lcd %CD% %cd% as in using the current directory that the script and ftp batch files are in.
Is there any way of achieving this?
Thanks \\NathansswellYour syntax should work but this is probably better, as it should HANDLE pathnames with LONG filename elements.
lcd "%cd%"Hmm, that's weird. The first TIME I tried this with the quotations, it gave me some error like: could not find the directory %cd% or something. But I tried it again and it worked. Either way, I'm glad. Thanks.
|