Solved

Frustrating FTP auto-capitalization problem please help

Posted on 2001-09-14
5
170 Views
Last Modified: 2010-05-02
I have been trying for the past week to get my FTP problem solved. Problem is below:

I have created an application that logs on to a UNIX system via FTP. However when I use the command:

INET1.execute , "MKDIR chris",

A directory is created with the name if CHRIS. In other words the directory name is always in all caps no matter what I type in. This also occurs with the put command. If I type,

INET1.execute, "put test.tbb test.tbb", a file named TEST.TBB is created in the UNIX directory.

I need to be able to copy the files EXACTUALLY as I type them in the execute statement, because other they will not run in my employer's UNIX programs.

Would someone please please please tell me how to prevent it from capitilizing my filenames? Thanks. Please replay with the answer and also, send your replies to Chris.Johnson@bellsouth.com. Thanks!!!!  


0
Comment
Question by:WdnUlik2no
5 Comments
 
LVL 16

Expert Comment

by:Richie_Simonetti
ID: 6484352
It appears to be a problem with UNIX Server cfg.
0
 

Author Comment

by:WdnUlik2no
ID: 6484372
Nah its not that, because if I physically log in to the UNIX server I am able to create directories and get files exactually as I type them.  Also if I ftp in UNIX from DOS, I am also able to create directories and get files exactually as I type them.  It seems like the problem is the way the Internet Transfer Control is setup.  Maybe I have to set an option or something, Im not sure.
0
 
LVL 75

Accepted Solution

by:
Anthony Perkins earned 50 total points
ID: 6485280
This works fine for me:
With Inet1
   .URL = "FTP site goes here"
   .Username = "username goes here"
   .Password = "password goes here"
   .Execute , "MKDIR Test"
   Do While .StillExecuting
      DoEvents
   Loop
   .Execute , "MKDIR TeSt"
   Do While .StillExecuting
      DoEvents
   Loop
End With

In other words it creates two distinct directories on a UNIX box.

You can also try using the following WiniInet API to see if you get the same result (I suspect you will):

Private Declare Function InternetOpen Lib "Wininet.dll" Alias "InternetOpenA" (ByVal lpszAgent As String, ByVal dwAccessType As Long, ByVal lpszProxyName As String, ByVal lpszProxyBypass As String, ByVal dwFlags As Long) As Long
Private Declare Function InternetConnect Lib "Wininet.dll" Alias "InternetConnectA" (ByVal hInternet As Long, ByVal lpszServerName As String, ByVal nServerPort As Long, ByVal lpszUserName As String, ByVal lpszPassword As String, ByVal dwService As Long, ByVal dwFlags As Long, ByVal dwContext As Long) As Long
Private Declare Function InternetCloseHandle Lib "Wininet.dll" (ByVal hEnumHandle As Long) As Long
Private Declare Function FtpCreateDirectory Lib "Wininet.dll" Alias "FtpCreateDirectoryA" (ByVal hConnect As Long, ByVal lpszDirectory As String) As Boolean

Public Sub Test()
Const INTERNET_SERVICE_FTP = 1
Const INTERNET_FLAG_EXISTING_CONNECT = &H20000000
Const INTERNET_FLAG_NO_CACHE_WRITE = &H4000000
Const INTERNET_OPEN_TYPE_DIRECT = 1
Const INTERNET_DEFAULT_FTP_PORT = 21
Dim hInternet As Long
Dim hConnect As Long
Dim Host As String
Dim Username As String
Dim Password As String
Dim Directory As String

Host = "FTP site goes here"
Username = "username"
Password = "password"
Directory = "TeSt"

hInternet = InternetOpen(App.EXEName, INTERNET_OPEN_TYPE_DIRECT, vbNullString, vbNullString, INTERNET_FLAG_NO_CACHE_WRITE)
If hInternet = 0 Then
   MsgBox "Error: " & CStr(Err.LastDllError), vbCritical, "InternetOpen"
Else
   hConnect = InternetConnect(hInternet, _
                                             Host, _
                                             INTERNET_DEFAULT_FTP_PORT, _
                                             Username, _
                                             Password, _
                                             INTERNET_SERVICE_FTP, _
                                             INTERNET_FLAG_EXISTING_CONNECT, &H0)
   If hConnect = 0 Then
      MsgBox "Error: " & CStr(Err.LastDllError), vbCritical, "InternetConnect"
   Else
      If FtpCreateDirectory(hConnect, Directory) = 0 Then
         MsgBox "Error: " & CStr(Err.LastDllError), vbCritical, "FtpCreateDirectory"
      End If
      InternetCloseHandle hConnect
   End If
   InternetCloseHandle hInternet
End If

End Sub

Anthony
0
 
LVL 49

Expert Comment

by:DanRollins
ID: 7208433
Hi WdnUlik2no@devx,
It appears that you have forgotten this question. I will ask Community Support to close it unless you finalize it within 7 days. I will ask a Community Support Moderator to:

    Accept acperkins@devx's comment(s) as an answer.

WdnUlik2no@devx, if you think your question was not answered at all or if you need help, just post a new comment here; Community Support will help you.  DO NOT accept this comment as an answer.

EXPERTS: If you disagree with that recommendation, please post an explanatory comment.
==========
DanRollins -- EE database cleanup volunteer
0
 
LVL 5

Expert Comment

by:Netminder
ID: 7241245
Per recommendation, force-accepted.

Netminder
CS Moderator
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

863 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

25 Experts available now in Live!

Get 1:1 Help Now