Can I copy files to different destinations based on a value in a database using PowerShell?
Is it possible to use powershell to copy files from one location to another based on a value in a dat开发者_如何学编程abase? Below is my requirement:
- Mapping of what files belong to which person is stored in the database.
- I need to use the value in the db and access the file system to separate out files and create folders for one folder per person and enable scheduled copying of files.
Yes, you can do that with PowerShell. You can use or write a function like Lee Holmes' InvokeSQLCommand to query a database. You can fill a variable with the results and copy files based the values in the result. If you have specific questions on how to do this please post them as separate questions.
精彩评论