Solved

Frustrating FTP auto-capitalization problem please help

Posted on 2001-09-14
5
165 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

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

747 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

11 Experts available now in Live!

Get 1:1 Help Now