I'm looking to copy the contents of a network folder to the local working directory of a script. Ideally something like this:

<copy_app.exe> \\Destination\Folder $CurrentDirectory

... except that I don't know what $CurrentDirectory is as it's part of a deployment workflow and could be on any machine in a guid-generated folder.

Ideally, I'd like a switch to change the folder/file attributes like robocopy does (/a+:n) because the files I'm getting are going to be read-only and I need them to be normal.

This is on a Windows 7 / Windows Server 2008 R2 environment.

link|improve this question

57% accept rate
What are you scripting in? Are you asking the method for a certain scripting languauge? – chrsblck Jul 14 '11 at 22:09
@PlanetCaravan: Whichever scripting environment makes sense. batch or powershell are preferred. – SnOrfus Jul 15 '11 at 0:48
feedback

1 Answer

Use . to refer to the current folder

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.