Search code examples
vbscriptuploadftpmkdir

vbscript , creating a new directory using mkdir doesn't work


I am having problem creating a new directory inside my FTP using mkdir,

here is the code

    script = script & "open " & hostname & " " & port & vbCRLF
    script = script & "user " & username & vbCRLF
    script = script & password & vbCRLF
    'script = script & "lcd " & """" & localDir & """" & vbCRLF
    script = script & "mkdir" & variableName & vbCRLF
    script = script & "binary" & vbCRLF
    script = script & "prompt n" & vbCRLF
    script = script & "put " & """" & strline & """" & vbCRLF

instead of creating a new directory 'fff' and putting file there, it is putting all the files in parent directory.

What am i doing wrong ?


Solution

  • You are missing a space after mkdir.