Forum Discussion

rjack's avatar
rjack
Brass Contributor
Jul 30, 2021
Solved

Script from 2 csv - URL list and Folder list

Hello there! I have 2 csv files.  one has 82 rows with unique site address. like below     the other has 1314ish folder names with path. like below   Previously, I used to create 1...
  • farismalaeb's avatar
    Aug 01, 2021

    I took a quick sneak peek at your code and I don't think it will work.

    Your code is structure like this

     

    Foreach{

      Variable

         Function DoSomething{

             Function DoSomethingMore{

            }

          }

    }

    This is not correct,

    - Don't place the Function inside the Foreach, Foreach should be inside the function.

    - If you need the Function to respone to a value, you need to set parameter to the function, something like DoSomething -FolderName $URL, and define the FolderName in the Function.

     

    If the function are not needed, just remove them and keep the code of the function inside the foreach.

     

    also you can use ISE and debug your code and you will see that the function block is not actually executed.

     

    -------------------

    Hope this help, if this answer help, please mark this answer as Best Reponse.

     

Resources