Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.

share|improve this question
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

Use . to refer to the current folder

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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