File2FTP Uploader.hta with spaces Problems

Batch, ASP, JScript, Kixtart, etc.
Forum rules
Do not post any licensing information in this forum.

Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
This topic is 11 years and 9 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
Locked
User avatar
hackoo
Posts: 103
Last visit: Tue Apr 26, 2016 9:02 am

File2FTP Uploader.hta with spaces Problems

Post 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 !
jvierra
Posts: 15439
Last visit: Tue Nov 21, 2023 6:37 pm
Answers: 30
Has voted: 4 times
Been upvoted: 33 times

File2FTP Uploader.hta with spaces Problems

Post 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.
jvierra
Posts: 15439
Last visit: Tue Nov 21, 2023 6:37 pm
Answers: 30
Has voted: 4 times
Been upvoted: 33 times

File2FTP Uploader.hta with spaces Problems

Post 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.

This topic is 11 years and 9 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
Locked