Support Forums

File2FTP Uploader.hta with spaces Problems

Batch, ASP, JScript, Kixtart, etc.
Forum rules
Do not post any licensing information in this forum.
User avatar
hackoo
Posts: 103
Joined: Sat Jan 22, 2011 12:27 am

File2FTP Uploader.hta with spaces Problems

Postby hackoo » Sun Jun 03, 2012 10:30 am

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 !
User avatar
jvierra
Posts: 9696
Joined: Tue May 22, 2007 9:57 am
Contact:

File2FTP Uploader.hta with spaces Problems

Postby jvierra » Mon Jun 04, 2012 2:29 am

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.

User avatar
jvierra
Posts: 9696
Joined: Tue May 22, 2007 9:57 am
Contact:

File2FTP Uploader.hta with spaces Problems

Postby jvierra » Mon Jun 04, 2012 6:14 am

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.


Return to “Other Scripting Languages”

Who is online

Users browsing this forum: No registered users and 1 guest