¿ù°£ Àα⠰Խù°

°Ô½Ã¹° 58°Ç
   
[POWERSHELL] Ftp_upload
±Û¾´ÀÌ : ÃÖ°í°ü¸®ÀÚ ³¯Â¥ : 2012-05-18 (±Ý) 13:49 Á¶È¸ : 3836
±ÛÁÖ¼Ò :
                          

http://blogs.solidq.com/enriquepuignouselles/post.aspx?id=3&title=uploading+files+to+an+ftp+server+with+powershell


$Dir_file="C:\a.txt"
#ftp server
$ftp = "ftp://192.168.XXX.XXX/"
$user = "XXXXXXXXX"
$pass = "XXXXXXXXX"

$webclient = New-Object System.Net.WebClient 
$webclient.Credentials = New-Object System.Net.NetworkCredential($user,$pass)  

#list every sql server trace file
foreach($item in (dir $Dir "*.trc")){ 
"Uploading $item..."
$uri = New-Object System.Uri($ftp+$item.Name) 
$webclient.UploadFile($uri, $item.FullName) 
 } 



Uploading C:\a.txt...


À̸§ Æнº¿öµå
ºñ¹Ð±Û (üũÇÏ¸é ±Û¾´À̸¸ ³»¿ëÀ» È®ÀÎÇÒ ¼ö ÀÖ½À´Ï´Ù.)
¿ÞÂÊÀÇ ±ÛÀÚ¸¦ ÀÔ·ÂÇϼ¼¿ä.
   

 



 
»çÀÌÆ®¸í : ¸ðÁö¸®³× | ´ëÇ¥ : ÀÌ°æÇö | °³ÀÎÄ¿¹Â´ÏƼ : ·©Å°´åÄÄ ¿î¿µÃ¼Á¦(OS) | °æ±âµµ ¼º³²½Ã ºÐ´ç±¸ | ÀüÀÚ¿ìÆí : mojily°ñ¹ðÀÌchonnom.com Copyright ¨Ï www.chonnom.com www.kyunghyun.net www.mojily.net. All rights reserved.