What do I specify for the root directory using rootDirectory with FtpUpload@2?

Rod Falanga 561 Reputation points

I'm using the task FtpUpload@2 in an Azure DevOps pipeline to upload a static website to a hosting company. But I'm not sure how to specify the root folder at the destination website. (I know how to do a subfolder, but not the root folder.) Here's what I've got for that step so far:

- task: FtpUpload@2
    credentialsOption: 'inputs'
    serverUrl: 'ftp://ftp.destination.com'
    username: '$(MyUsername)'
    password: '$(MyPassword)'
    rootDirectory: '.'
    filePatterns: '**'
    remoteDirectory: '.'
    clean: true
    cleanContents: false
    preservePaths: true
    trustSSL: false

The thing is I don't know what I should use for remoteDirectory. Should I use an empty string (''), or should I use a single period like I've got here ('.'). Or should I use a single slash ('/')? Or should I use something entirely different?

Not Monitored
Not Monitored
Tag not monitored by Microsoft.
37,067 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. SnehaAgrawal-MSFT 19,511 Reputation points

    Thanks! You may refer to this document link here https://learn.microsoft.com/en-us/azure/devops/pipelines/tasks/utility/ftp-upload?view=azure-devops might be helpful.

    Also, Your query seems to be more related to Azure DevOps and questions related to it are not supported on this forum

    Suggest you to reach out in dedicated forum for it over here : Azure DevOps forum