Search For
Flagging a Snippet, takes the snippet to Moderator Attention;


0
Using "put" command you can upload only a single file at a time.
To upload multiple files, you should use "mput" command.

Syntax:
psftp> mput filename1 filename2 filename3 ...


SFTP expects local path and remote path from the user before uploading since it is a file transfer.
If user does not specify anything, the default paths will be taken automatically by PSFTP.

Example:
psftp> mput file1.sh file2.sh file3.sh


The above code will upload the files from the default local path (if exists) and put them in the remote default path.

Example:
psftp> pwd
current remote working directory is /home/user1
psftp> cd /mine/files/level
new remote working directory is /mine/files/level
psftp> lpwd
current local working directory is C:\Documents and Settings\Desktop
psftp> lcd C:\folder1
new local working directory is C:\folder1
psftp> mput file1.sh file2.sh file3.sh


Since the remote and local paths are already defined, the above code will upload file1.sh, file2.sh, file3.sh from C:\folder1 to /mine/files/level




Vote! You feel this code is working like charm ? Go a head Login and Press up arrow.
Didn't work ?, press down arrow and let us know the error in comments

Comments