ALEX
ALEX

Reputation: 64

Copy folder to current path open in Command Prompt

I'm trying to create a batch file that copies one folder to the current path open in command prompt.

This is the code I have, but it doesn't work.

@echo off
xcopy /s c:\Users\Alexander\Documents\Other d:\%cd%
pause

Upvotes: 1

Views: 4222

Answers (1)

Simon Catlin
Simon Catlin

Reputation: 2229

Over complicating things...

Just use ".", which means current directory, i.e.:

xcopy /s c:\blah\blah .

Upvotes: 3

Related Questions