I want to download all of my remote files and folders from an ftp server to my local machine using the command line or a '.bat' file.
4 Answers
You could use a PowerShell option to perform this task a premade function already exist Here. http://powershell.com/cs/media/p/804.aspx
All you would need to run is:
Get-FTPFile -Source "ftp://server/path" -Target "C:\temp" -UserName "Username" -Password "P@ssw0rd"
- 301
- 1
- 5
You can try using wget for windows and enter it's path into your system environmental variables.
It's very lightweight and it won't be a bad utility for your system if it's something you want.
- 6,354
- 1
- 29
- 34
It would be easiest to use an FTP client like FileZilla. You can use it to log into the FTP account, select a local folder, select the files in the remote folder, then simply drag-and-drop them to the local folder. Moreover, if you lose the connection, you can try again later in the exact same way, but when you get prompted about some files already existing (it’ll ask if you want to overwrite the existing files), you can select to ignore/skip it and all further files that exist. That way you can make sure to get all of the files and not worry about having to do it in one go.
- 68,243
- 36
- 223
- 356
-
-1 he said cmd or bat and you speak of drag and drop. You should've said this doesn't answer it, and perhaps written it in a comment. – barlop Sep 03 '11 at 21:03
-
@barlop, I clearly said *it would be easiest*. Re-read the question; he says nothing to indicate that the command-line is actually required, so using a GUI would indeed be easier. – Synetech Sep 03 '11 at 22:35
-
He said via cmd or bat file, you think that can mean GUI? – barlop Sep 04 '11 at 01:05
-
I know what he said, but that doesn’t make it a **necessity**. Once again, I clearly said that using a GUI would be easier, so it is up to *him* to expound on their requirements and clarify if a CLI is actually needed. – Synetech Sep 04 '11 at 18:10
-
What you mean is it's up to him if he wants to change his question to include how to do it in a GUI(an unlikely question since it's fairly obvious, especially to somebody that can ask the question he did). expounding his requirements to include GUI would be different to what he asked, and would be changing the question. You are answering a different question. It's like if somebody asks How do I do X in Y, and you tell him how to do X in Z. It's a suggestion rather than an answer. – barlop Sep 04 '11 at 23:15
-
Secondly, it'd be very annoying, if any time somebody wanted to ask How do I do X in Y, if they actually wanted an answer of how to do X in Y, it'd be very annoying if they had to state I NEED it in Y, and REQUIRE it only in Y.If they say in Y/they want it in Y, it should be enough to get that question across.Anyhow, it makes perfect sense to want it in a batch rather than a GUI.If you knew of ways to automate it in a GUI and perhaps invisibly too,or at least automate it, somewhat like the benefits of a batch)then that may justify itself as an "alternative" to a batch/cmd or may be a cmd – barlop Sep 04 '11 at 23:20
-
I know some people sometimes don't know what they want, and they ask how to do X in Y, when they mean how to do X, but to say how to do it in Z, is a suggestion, unless they change their question. But if they ask how to do it in Y, they don't have to convince you that they need to do it in Y, in order to be answered how to do it in Y. If they ask how to do it in Y, that's the question. – barlop Sep 04 '11 at 23:24
-
Funny how you’re the only one complaining; the OP hasn’t complained one wit. – Synetech Sep 06 '11 at 21:00
-
@Synatech inc I'm not complaining, i'm critiquing, it takes balls, brains, and emotional detachment and many aren't capable of doing it for lack of that combination. Also the OP seems to be a quiet fellow- rep of 6, who hasn't been seen for about 6 months. – barlop Sep 06 '11 at 22:00
-
Exactly. If he were as adept as you inferred, chances are he would have returned to examine the answers. Plus, it sounds like he was asking for a way to copy his stuff from a hosted server, which would not *require* it to be done from the command-line, so is not a stretch to think that perhaps a GUI would be easier for them. – Synetech Sep 07 '11 at 05:32
-
he doesn't have to say he requires x to say he wants it in x. you're reading the question more generically than he asked it. Is it a stretch to think he might prefer a GUI or be more informed by being told that such a thing exists, I think it is, but even if it isn't a stretch. he doesn't have to say he requires x to say he wants it in x. if you give it to him in y because he says he wants it in x but didn't say he requires it in x then your answer may be of value, like if he'd never heard of y,but it still would be a suggestion rather than an answer, unless he made his question more generic – barlop Sep 07 '11 at 16:29
-
why on earth hasn't the chat link appeared yet? normally it would've appeared long ago. – barlop Sep 07 '11 at 22:50
-
It’s because the comments are not A B A B; you keep talking so much that you have to break it up into multiple comments in a row, which breaks the pattern, so it doesn’t trigger. – Synetech Sep 08 '11 at 00:11
-
this one went ABABA then appeared http://superuser.com/questions/112136/ms-dos-command-to-delete-all-files-except-one/112143#comment-362246 but the q/a on this page has done ABABA twice and still nothing. – barlop Sep 08 '11 at 00:20
-
let us [continue this discussion in chat](http://chat.stackexchange.com/rooms/1307/discussion-between-barlop-and-synetech-inc) – barlop Sep 08 '11 at 00:20