Microsoft KB Archive/263839

= How To Use Long File Names with the Internet Transfer Control Execute Method =

Article ID: 263839

Article Last Modified on 11/23/2006

-

APPLIES TO


 * Microsoft Visual Basic 6.0 Learning Edition
 * Microsoft Visual Basic 6.0 Professional Edition
 * Microsoft Visual Basic 6.0 Enterprise Edition
 * Microsoft Visual Basic 6.0 Enterprise Edition Service Pack 3

-



This article was previously published under Q263839



SUMMARY
The Internet Transfer control implements two widely used Internet protocols: the HyperText Transfer Protocol (HTTP) and the File Transfer Protocol (FTP). You can use the Internet Transfer control to connect to any site that uses one of these protocols, and you can use the Execute method to retrieve files.

You can also use the GET command with the Execute method to copy files from a FTP site to a local hard disk drive. However, the command does not natively support a destination folder that has long file names and spaces within the path. The command executes but does not send the GET command to the FTP server. This article describes how you can save a file that has a long file name and spaces within the path from an FTP site to a local folder.



MORE INFORMATION
Microsoft provides programming examples for illustration only, without warranty either expressed or implied, including, but not limited to, the implied warranties of merchantability and/or fitness for a particular purpose. This article assumes that you are familiar with the programming language being demonstrated and the tools used to create and debug procedures. Microsoft support professionals can help explain the functionality of a particular procedure, but they will not modify these examples to provide added functionality or construct procedures to meet your specific needs. If you have limited programming experience, you may want to contact a Microsoft Certified Partner or the Microsoft fee-based consulting line at (800) 936-5200. For more information about Microsoft Certified Partners, please visit the following Microsoft Web site:

https://partner.microsoft.com/global/30000104

For more information about the support options that are available and about how to contact Microsoft, visit the following Microsoft Web site:

http://support.microsoft.com/default.aspx?scid=fh;EN-US;CNTACTMS

To save a file from the FTP site to a local folder, use the following code: Private Sub Command1_Click Inet1.UserName = &quot;Username&quot; Inet1.Password = &quot;Password&quot; Inet1.URL = &quot;ftp://YourFTPServer&quot; Inet1.Execute, &quot;GET testfile.txt &quot; & Chr(34) & &quot;C:\Program Files\LongFileName.txt&quot; & Chr(34) End Sub

Additional query words: GET Execute

Keywords: kbhowto kbitc KB263839

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.