scripting - Need a PowerShell script that copies files from the current dir that the script is run from to another location -


I have a very basic PowerShell script with which I need help with my first time to do so bare scripts with me Attempt is I work for a software development and they asked me to write a script which they can package with their build updates. Basically they will complete a build that will move to a folder (say \ server \ build \ release1.1.2). We need a script that takes all the files / folders from that folder and copies them to the designated places.

I need a script to read the creation of the current "with the title of the folder and make it the same # build folder when it copes it is quite easy for it but I need all dynamic references, So when the release 1.1.3 comes out, we leave the same script there and copy all the files in the appropriate directories (and make them if they do not exist).

I am not sure that I am completely clear. If I am not, please tell me and I will answer those questions as I can. Thanks !.

You should initiate this script, run it to see an example of the value to be created.

  # variable name PowerShell module $ PSScriptRoot = ($ MyInvocation.MyCommand.Path | Split-Path | Solution-Path). Proxy Path $ BuildName = $ PSScriptRoot | Split-Path -Leaf @ "This screen The file is located at: $ ($ MyInvocation.MyCommand.Path) folder This script file is: $ PSScriptRoot folder name is in this script file: $ BuildName You can do this to copy the files: Copy-item -path `$ PSScriptRoot \ * -Destination C: \ install \ $ BuildName -Recurse" @  

Comments

Popular posts from this blog

c++ - Linux and clipboard -

What is expire header and how to achive them in ASP.NET and PHP? -

sql server - How can I determine which of my SQL 2005 statistics are unused? -