esnmb
-
Total Posts
:
453
- Scores: 0
-
Reward points
:
0
- Joined: 1/11/2005
- Location: USA
-
Status: offline
|
Download multiple files
Friday, April 11, 2008 3:58 PM
( permalink)
This script goes out and seems to write empty files without actually downloading them. Thoughts? $clnt = new-object system.net.webclient $colFiles = Import-csv C:\temp\DL.csv foreach ($file in $colFiles) { $clnt.DownloadFile($file.Files, $file.Path) } The csv is formated like: Files,Path Http://blah.com/file.rar,c:\temp\file.rar etc,etc
|
|
|
|
ebgreen
-
Total Posts
:
8219
- Scores: 98
-
Reward points
:
0
- Joined: 7/12/2005
-
Status: offline
|
RE: Download multiple files
Monday, April 14, 2008 2:21 AM
( permalink)
I think you may have environmental issues. The code that you posted worked just fine for me as is.
|
|
|
|
esnmb
-
Total Posts
:
453
- Scores: 0
-
Reward points
:
0
- Joined: 1/11/2005
- Location: USA
-
Status: offline
|
RE: Download multiple files
Monday, April 14, 2008 2:37 AM
( permalink)
Strange. I am running on a vista machine. Are you?
|
|
|
|
ebgreen
-
Total Posts
:
8219
- Scores: 98
-
Reward points
:
0
- Joined: 7/12/2005
-
Status: offline
|
RE: Download multiple files
Monday, April 14, 2008 2:57 AM
( permalink)
Nope XPSP2. If I get a chance I will try it on a Vista machine but I suspect Vista Security may very well be the culprit.
|
|
|
|
esnmb
-
Total Posts
:
453
- Scores: 0
-
Reward points
:
0
- Joined: 1/11/2005
- Location: USA
-
Status: offline
|
RE: Download multiple files
Monday, April 14, 2008 3:17 AM
( permalink)
True. Thanks for at least verifying that the code was good.
|
|
|
|