Bram W.
Bram W.

Reputation: 1607

FTP create path with MKD command

I need to store a file on a FTP server using commands. For example FolderA/FolderB/FolderC/myfile.txt. Do I need to create each folder step by step? That would be: MKD FolderA MKD FolderB MKD FolderC STOR FolderA/FolderB/FolderC/myfile.txt

Or is there a quicker/better way to do this?

Upvotes: 3

Views: 13907

Answers (2)

WiredCoder
WiredCoder

Reputation: 926

yes you can use mkd folder1/folder2/folder3 and it will create the whole tree. the same option exists on windows with mkdir

Upvotes: -1

Some servers understand complex paths, but the standard way is to create them one by one:

MKD FolderA 
CWD FolderA 
MKD FolderB 
CWD FolderB 
MKD FolderC 
CWD FolderC
STOR myfile.txt

Upvotes: 6

Related Questions