Select-String : The file C:\Users\XXXXXXX\AppData\Local\Temp\debug cannot be read: Access ... denied
C:\Utils\WinSCP
, for many years.
I wanted to use the Search TEXT within files feature, via the built-in extension, so I installed WinSCP Windows Installer in Win11 "for everyone" and selected the custom install, to the
C:\Utils\WinSCP
dir, not the default dir.
I then ran the Commands > Static Custom Commands > Search for Text Extension.
PowerShell window comes up, searches, finds my text (simply
QTPi4Eth
in *.* from root on an Asus Router), continues 3 more lines then I get this error below (User Redacted to XXXXXX).
I have searched the forum but cannot find a similar instance that has been answered and solved. How can I help you troubleshoot this please?
File /data/boot_state_0 matches mask, searching contents... File /data/scratchpad matches mask, searching contents... File /debug matches mask, searching contents... Select-String : The file C:\Users\XXXXXXX\AppData\Local\Temp\debug cannot be read: Access to the path 'C:\Users\XXXXXXX\AppData\Local\Temp\debug' is denied. At C:\Utils\WinSCP\Extensions\SearchText.WinSCPextension.ps1:78 char:30 + ... $matchInfo = Select-String -Path $tempPath -SimpleMatch $text + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : InvalidArgument: (:) [Select-String], ArgumentException + FullyQualifiedErrorId : ProcessingFile,Microsoft.PowerShell.Commands.SelectStringCommand Confirm The item at C:\Users\XXXXXXX\AppData\Local\Temp\debug has children and the Recurse parameter was not specified. If you continue, all children will be removed with the item. Are you sure you want to continue? [Y] Yes [A] Yes to All [N] No [L] No to All [S] Suspend [?] Help (default is "Y"):