mkdir
SFTP 또는 FTP 서버에 새 폴더 만들기
설명
예제
폴더 만들기
FTP 서버에 연결하고 폴더를 만듭니다. 만든 폴더로 이동하고 파일을 업로드합니다. 이 예제에서는 실제로는 존재하지 않는 컴퓨터인 ftp.example.com
에서 가상의 FTP 세션을 보여줍니다. FTP 서버에 파일을 업로드하고 폴더를 만들 권한이 있는 사용자가 FTP 서버에 액세스한 경우, 이 예제에 나온 것처럼 mkdir
함수를 사용할 수 있습니다.
먼저, 서버에 연결합니다.
s = ftp('ftp.example.com')
FTP with properties: Host: "ftp.example.com" Username: "anonymous" Port: 21 ServerLocale: "en_GB" DirParserFcn: @matlab.io.ftp.parseDirListingForUnix Mode: "binary" LocalDataConnectionMethod: "passive" RemoteWorkingDirectory: "/"
FTP 서버에서 현재 폴더의 내용을 표시합니다.
dir(s)
myscript.m README.txt pub
이름이 scripts
인 폴더를 만듭니다.
mkdir(s,'scripts')
새 scripts
폴더를 포함하여 현재 폴더의 업데이트된 내용을 표시합니다.
dir(s)
myscript.m README.txt pub scripts
scripts
폴더로 이동하여 파일을 업로드합니다.
cd(s,'scripts'); mput(s,'myNewScript.m')
입력 인수
s
— SFTP 또는 FTP 서버와의 연결
SFTP 객체 | FTP 객체
SFTP 또는 FTP 서버와의 연결로, SFTP 객체 또는 FTP 객체로 지정됩니다.
folder
— 새 폴더
문자형 벡터 | string형 스칼라
SFTP 또는 FTP 서버의 새 폴더로, 문자형 벡터 또는 string형 스칼라로 지정됩니다.
버전 내역
R2006a 이전에 개발됨
MATLAB 명령
다음 MATLAB 명령에 해당하는 링크를 클릭했습니다.
명령을 실행하려면 MATLAB 명령 창에 입력하십시오. 웹 브라우저는 MATLAB 명령을 지원하지 않습니다.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)