Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Frustrating FTP auto-capitalization problem please help

Posted on 2001-09-14
5
Medium Priority
?
210 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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 200 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

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

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

Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
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…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Suggested Courses

636 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