 
     generateUpload dirs, files, f for f in @files
       
-
-    dirs = for i of dirs
-      "mkdir \"#{ i }\""
+    if opts.mkdirs
+      dirs = for i of dirs
+        "mkdir \"#{ i }\""
+    else
+      dirs = []
 
     for arg in args
       switch arg

      host: 'localhost'
      port: 21
      passive: no
      dryrun: no
      ftpCommand: 'ftp'
      encoding: 'utf-8'
      ftpEncoding: 'utf-8'

    auth = grunt.file.readJSON('.ftppass')?[opts.authKey ? opts.host]


    cmds = [
      "open #{ opts.host } #{ opts.port }"
      "user #{ auth.username } #{ auth.password }"
      "type #{opts.type}"
      'prompt'
    ]
    cmds.push 'passive' if opts.passive
