Jump to content

Interesting problem


GEOSoft
 Share

Recommended Posts

Someone was having a problem using FTP to upload files because of uppercase in the filename. Don't ask why that would make a difference but apperently on his server it does. I whipped up a few lines of code compiled it in ANSI and sent it to him. Here is the reply I just received.

I get a "linked to missing export KERNEL32.DLL, GetProcessIoCounters" in WinSE

Here is the code I used.

$Flist = FileOpenDialog("Select the file(s) to convert.", @MyDocumentsDir, "All (*.*)", 4)
If @Error then Exit
If NOT StringInStr($Flist, "|") Then
    $sSplit = StringInStr($Flist, "\", 0, -1)
    $Flist = StringLeft($Flist, $sSplit) & "|" & StringMid($Flist, $sSplit +1)
EndIf
$Flist = StringSplit($Flist, "|")
$Fldr = $Flist[1]
If StringRight($Fldr, 1) <> "\" Then $Fldr &= "\"
For $I = 2 to $Flist[0]
    $nTest = StringSplit($Flist[$I], '.')
    FileMove($Fldr & $Flist[$I], $Fldr & StringLower($Flist[$I]), 1)
Next
MsgBox(0, "Finished", "Your file names have been changed to lower case")

Any ideas why? It's fine on XP and I don't have a 98 box anymore.

George

Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.

Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.***

The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number.

Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else.

"Old age and treachery will always overcome youth and skill!"

Link to comment
Share on other sites

Someone was having a problem using FTP to upload files because of uppercase in the filename. Don't ask why that would make a difference but apperently on his server it does. I whipped up a few lines of code compiled it in ANSI and sent it to him. Here is the reply I just received.

Here is the code I used.

$Flist = FileOpenDialog("Select the file(s) to convert.", @MyDocumentsDir, "All (*.*)", 4)
If @Error then Exit
If NOT StringInStr($Flist, "|") Then
    $sSplit = StringInStr($Flist, "\", 0, -1)
    $Flist = StringLeft($Flist, $sSplit) & "|" & StringMid($Flist, $sSplit +1)
EndIf
$Flist = StringSplit($Flist, "|")
$Fldr = $Flist[1]
If StringRight($Fldr, 1) <> "\" Then $Fldr &= "\"
For $I = 2 to $Flist[0]
    $nTest = StringSplit($Flist[$I], '.')
    FileMove($Fldr & $Flist[$I], $Fldr & StringLower($Flist[$I]), 1)
Next
MsgBox(0, "Finished", "Your file names have been changed to lower case")

Any ideas why? It's fine on XP and I don't have a 98 box anymore.

Use download.exe from Noël Danjou, works like a charm.
Link to comment
Share on other sites

Use download.exe from Noël Danjou, works like a charm.

That might work at his end but I don't know anything about his FTP setup and it shouldn't matter to this script. For simple FTP you can do it in Internet Explorer but for some reason the server rejects Caps in the file names. I need to know why this script doesn't work in 98. I'm wondering if it might be a previously reported bug in the .9.3 compiler or if it is something in Win98. I need someone with 98 to test it since I don't have a 98 box anymore and I don't want to install a VM just for 1 script this simple.

George

Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.

Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.***

The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number.

Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else.

"Old age and treachery will always overcome youth and skill!"

Link to comment
Share on other sites

aaahhh, just trust, AHK & AUTOIT do not do well compared to a dedicated, working, free, program. I have tested the same technology that AutoIT uses. download.exe works every time, not 90%.

OK . Lets just forget about what his problem with FTP was and look at the current problem.

The code I posted changes the file names to all lower case. It works in XP and not in 98. The error message I quoted is what happens when the script is compiled and run in Win 98. That's the issue. FTP doesn't even enter into it.

George

Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.

Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.***

The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number.

Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else.

"Old age and treachery will always overcome youth and skill!"

Link to comment
Share on other sites

OK . Lets just forget about what his problem with FTP was and look at the current problem.

The code I posted changes the file names to all lower case. It works in XP and not in 98. The error message I quoted is what happens when the script is compiled and run in Win 98. That's the issue. FTP doesn't even enter into it.

George,

I can confirm your reported error.

If I run the script uncompiled on my 98SE box, with latest AutoIt release or beta, I get an "Error Starting Program" message box with the details:

"The AUTOIT3A.EXE file is linked to missing export KERNEL32.DLL:GetProcessIoCounters"

Behind that there is another error msg with the title being the path of the script and the text starting with a repeat of the full path of the script and then

"A device attached to the system is not functioning"

What's also weird is that when I went to my 98 box, I had an old version of Autoit installed (3.1.1.0 I think), and that allowed me to run the script, but after your confirmation dialog appeared about the successful conversion, I checked the test file and it was gone!. I recreated the file and tried again, same thing, it disappears on the file move.

Edited by ResNullius
Link to comment
Share on other sites

George,

I can confirm your reported error.

If I run the script uncompiled on my 98SE box, with latest AutoIt release or beta, I get an "Error Starting Program" message box with the details:

Behind that there is another error msg with the title being the path of the script and the text starting with a repeat of the full path of the script and then

What's also weird is that when I went to my 98 box, I had an old version of Autoit installed (3.1.1.0 I think), and that allowed me to run the script, but after your confirmation dialog appeared about the successful conversion, I checked the test file and it was gone!. I recreated the file and tried again, same thing, it disappears on the file move.

Thanks @ResNullius

This is starting to smell like a bug and it may be the one reported when using the beta version on NT4. I don't like that file disappeared thing though. That could be dangerous. I ran it under XP and the files were renamed as they should be.

George

Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.

Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.***

The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number.

Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else.

"Old age and treachery will always overcome youth and skill!"

Link to comment
Share on other sites

  • Developers

You rang :)

Is already reported here : http://www.autoitscript.com/forum/index.php?showtopic=54730

<_<

Edited by Jos

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

You bet I rang :)

I thought it might be a bug but that's not the one I was thinking of.

I guess I can put 3.2.8.1 back in and try it. The report of disappearing files is troublesome though. <_<

Thanks Jos

George

Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.

Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.***

The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number.

Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else.

"Old age and treachery will always overcome youth and skill!"

Link to comment
Share on other sites

  • Developers

You bet I rang :P

I thought it might be a bug but that's not the one I was thinking of.

I guess I can put 3.2.8.1 back in and try it. The report of disappearing files is troublesome though. <_<

Thanks Jos

You're welcome :)

Edited by Jos

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

I just ran the program using AutoIt v3.2.3.0 and got no errors, but the filename was not converted to uppercase. If this isn't what you want to know, let me know.

Thanks Richard. I'm really happy that it didn't convert to upper case because it shuld convert to lower case.

What happens if you create a file named Test.txt? Does it return all lower? Perhaps 98 wont support all lower case. I don't remember.

George

Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.

Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.***

The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number.

Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else.

"Old age and treachery will always overcome youth and skill!"

Link to comment
Share on other sites

Thanks Richard. I'm really happy that it didn't convert to upper case because it shuld convert to lower case.

What happens if you create a file named Test.txt? Does it return all lower? Perhaps 98 wont support all lower case. I don't remember.

As a note about case mattering, if the server is Unix based then filenames are case sensitive so a file called 'AbC' and a different file 'abc' can both exist as different files in the same folder.

Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.
Link to comment
Share on other sites

As a note about case mattering, if the server is Unix based then filenames are case sensitive so a file called 'AbC' and a different file 'abc' can both exist as different files in the same folder.

But the Unix server will still accept uppercase. I don't know what the uppercase problem is with the server he's trying to upload to.

George

Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.

Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.***

The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number.

Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else.

"Old age and treachery will always overcome youth and skill!"

Link to comment
Share on other sites

recompiling with 3.2.8.1 didn't solve it so it will have to wait for the next release. I'll just tell the poor lad that he's SOL

George

Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.

Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.***

The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number.

Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else.

"Old age and treachery will always overcome youth and skill!"

Link to comment
Share on other sites

But the Unix server will still accept uppercase. I don't know what the uppercase problem is with the server he's trying to upload to.

It's possible that particular ftp server has a restriction in place to not allow uppercase file names. Have you tried to upload a file containing an uppercase letter to this server? Are you sure that it is indeed an uppercase value that is causing the problem? You might also look into find a batch renaming program that works with 98 if you can't get your script to work. There are free ones out there. (snapfiles.com , download.com ect..)
Link to comment
Share on other sites

It's possible that particular ftp server has a restriction in place to not allow uppercase file names. Have you tried to upload a file containing an uppercase letter to this server? Are you sure that it is indeed an uppercase value that is causing the problem? You might also look into find a batch renaming program that works with 98 if you can't get your script to work. There are free ones out there. (snapfiles.com , download.com ect..)

Here is a reply I just received from him in reply to a couple of questions

My hosting company is Libero-Infostrada

The hosting service is free

The rules I accepted say no uppercase are allowed.

I ftp with 'CuteFTP'

If I ftp Hallo.htm the file is uploaded, but if i call it from the

browser, the browser says File Not Found

So it is indeed the server that has the restrictions.

George

Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.

Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.***

The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number.

Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else.

"Old age and treachery will always overcome youth and skill!"

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...