I am new to PowerShell and I would like to be able to upload a file into a SFTP. I manually upload this file each morning and retrieve the results later in the date. The upload file is tricky because it has a date stamp, examples file_name_20161125, file_name_20161201, file_name_20161202. Below is what I have researched online and found in order to start this project.
# Get Date in order to find out date stamp $date = Get-Date -UFormat "%Y%m%d" # File location and name $locPath = "V:\Prod" $locFileName = "file_name_" $locExtension = ".csv" $locUploadName = $locPath + $locFileName + $date + $locExtension # FTP server information $Username = "username" $Password = "password" $RemoteFile = "ftp://abc.dfg.com"
Thank you so much!