Log short filename of uploaded file instead of full path?

Advertisement

tommy.sharp.prolorus
Joined:
Posts:
2
Location:
New Zealand

Log short filename of uploaded file instead of full path?

I am using Powershell to upload files to a SFTP server and am using some example code found in the forums to log the upload of each file. Currently it logs the full path of the file, is there any way to just log the file name and not the folder it is in?

# Log Results
foreach ($transfer in $transferResult.Transfers)
{
  FN_LogWrite "     Upload of $($transfer.FileName) succeeded"
}

Reply with quote

Advertisement

Advertisement

You cannot post new topics in this forum