Using .NET assembly to remove folder
Hi,
I have an SFTP site were files are delivered in a folder, were the folder name would be the previous day date. If it's 8th October the folder would be
I configured the below variables in the script
Then I'm trying to remove the folder using the below command
I'm being prompted
Regards
RamC
I have an SFTP site were files are delivered in a folder, were the folder name would be the previous day date. If it's 8th October the folder would be
20201007
. After that the files are downloaded, I need to remove the folder with all of its contents.
I configured the below variables in the script
$yesterday = (Get-date).AddDays(-1) $timestamp = $yesterday.ToString("yyyyMMdd")
Session.RemoveFile(RemotePath.EscapeFileMask(/folder/$timestamp))
/folder/$timestamp
isn't recognized.
Regards
RamC