Page 1 of 1

File2FTP Uploader.hta with spaces Problems

Posted: Sun Jun 03, 2012 10:30 am
by hackoo
Hi I made a HTA Application File2FTP Uploader.hta But i have some issues while browsing for a file located in a folder that contains a space like c:Program Files or Documents and settings So how can i solve this space problem ? Thank you for your help in advance !

File2FTP Uploader.hta with spaces Problems

Posted: Mon Jun 04, 2012 2:29 am
by jvierra
I am not goping to help you until uyou post that as a file. Pleas upload it. What you have posted is loaded with HTML bullets making it impossible to read or copy and paste.

Please only paste code from notepad or a plain text editor.

This is what your code looks like:


Sub Upload()
· 'MsgBox
FTPSERVER.Value &vbCr& FTPLOGIN.Value &vbCr&
Password.Value &vbCr& DossierDistant.Value &vbCr&
qq(file1.Value)
· If file1.Value = "" Then
· MsgBox "ATTENTION ! ! ! ! ! !" & vbcr & "Le fichier à uploder n'existe pas ? " & vbcr & "Veuillez SVP choisir un fichier pour l'upload !",48,"Le Fichier à uploder n'existe pas ? "
· End If
· 'MsgBox qq(file1.Value)
· FTPUpload FTPServer.Value,FTPLOGIN.Value,Password.Value,file1.Value,DossierDistant.Value,sResults
· End Sub
·

It is nearly impossibe to easily remove the formatting.

File2FTP Uploader.hta with spaces Problems

Posted: Mon Jun 04, 2012 6:14 am
by jvierra
If you simplify your code I think you willbe able to track down the issue. Create vbscript that can run from the commandline. Put WScript.Echo statements in and trace the progress. Somewher yuo have creaed an infinite loop which is the only reason an HTA will "freeze". Be sure all of your code works correctly before sticking it into an HTA. Keep all HTML out of teh main code stream so it will not cause breakage.