Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
40 lines (28 sloc) 1.47 KB
# The site below shows how to reference the Azure application publish settings
# REF:
# Fill in the Azure information in the 3 variables below
# NOTE: Split the publishUrl for the FTP profile into the first 2 variables
$userName="AzureApp\`$AzureApp" # Note that the dollar sign is escaped because that is part of the user name from the publish file.
Write-Host " Sending $file to $ftpUrl"
Write-Host " Generating command file $commandFile.."
# Generate the command file which logs in and pushes the file.
# NOTE: You can always use a static file, but this way you can change the way you do things in THIS file.
Write-Output "user $userName $password" > $commandFile # Logon
Write-Output "cd $destinationDir" >> $commandFile # Change to destination directory
Write-Output "put ""$file""" >> $commandFile # Push the local file
Write-Output "quit" >> $commandFile # Exit
Write-Host "ftp -n -s:$commandFile $ftpUrl"
# Initiate FTP without logging in and provide the command file.
ftp -n -s:$commandFile $ftpUrl
Write-Host " !!!!!! COMPLETE !!!!!!"