|
Answer» Hello,
I'm calling wget in a batch file to download from an FTP site which requires a password with characters that need to be encoded for the command to work. If I type the command directly into DOS, it works fine, but if I put it in a batch file and run it, what DOS echos is the password with the escape codes PARTIALLY eliminated.
Here's the command: wget -N ftp://cr-3476:j%40o9v!6%[emailprotected]/*.*
So I'm using %40 for @ and %26 for &
The intended password being"[emailprotected]!6&"
When echoed in DOS, the password comes out as "j0o9v!66"
So it eliminates the %4 from the %40 and the %2 from the %26 leaving just 0 and 6 in their places.
How can I endode this so it's SENT to the FTP as the intended "[emailprotected]!6&"?
why not just USE internal ftp command instead of wget..
try wgets website for help , or wait for someone else You can also try using the carat ( ^ ) as an escape character to keep the next character from being interpreted by DOSThanks for your suggestions!
I do need to use wget so that I can pull all newer files from the site, but the documentation for wget doesn't SEEM to say anything about using batch files or even escape codes.
Tried the ^. Just one before the escape character code didn't seem to have any effect. DOS eliminate the first two characters in the code as it normally does. Having 1 before each of the three escape characters like %40 had strange results. It caused DOS to eliminate several other characters in the password.Try doubling-up the % symbols
Code: [Select]wget -N ftp://cr-3476:j%%40o9v!6%%[emailprotected]/*.*That did it!
Thank you!
|