command line -p confusion

Core FTP client questions and answers
Post Reply
jacken
Posts: 11
Joined: Wed May 14, 2008 11:53 pm

command line -p confusion

Post by jacken »

it is a bit confusing. for uploading file, the -p option would requires you to include a / at the end of the directory (ex. /files/). However, when downloading file, you can't have the / at the end of the directory (ex. /files). The -p option works fine. Just wish that it should be more consistent on for format. Or be more flexible that it'll work with or without the slash.
jacken
Posts: 11
Joined: Wed May 14, 2008 11:53 pm

Post by jacken »

Yes, I'm using a Windows system. Just to illustrate a little better. Here is a command to download a file:

coreftp -d sftp://user:password@domain.com/file.txt -p c:\myfolder

Here is a command to upload a file:

coreftp -u c:\upfile.txt sftp://user:password@domain.com -p /webfolder/

As you can see, the -p option for download, which points to the local drive, does not requires as \ at the end. Whereas for upload, the -p option, which points to the web folder, requires a /. So I was just thinking that it would be less confusing if we don't need to remember when it'll need a / or not.
Post Reply