I am trying to get more familiar with WINSCP / powershell file handling, and i am quite the rookie so my questions here might be beginner ones.
I am attempting to download files from a shared hosting server, but i only want to target a specific file.
In this case i was to download this file from all domains on the server:
This have succeeded somewhat, but i am struggling with modifying my script to use a list of filepaths.
I want to make the list like this:
domainname2.dk/wp-config-php - and so on.
( in some cases i might want to get other php files too )
My script tells me:
Error: Exception calling “Check” with “0” argument(s): “Can’t get attributes of file ‘C:\Users\Dern\Desktop\Searchtarget\searchtargetlist.txt’.
Could not retrieve file information
‘/C:\Users\Dern\Desktop\Searchtarget\searchtargetlist.txt’ cannot be listed”
And i really cant seem to figure out why…
Link to my script:
I bet some of you more experienced scripters can point out my mistake…