1

I can't figure out how to copy a file in Windows Dos up multiple directories. Basically I want to replicate this linux command for windows

cp ../../../Dir/Item.o Item.o

Basically I need to copy an item that is up 3 folders from a folder called "Dir" into my current directory. I use this (in linux) as part of a build step and would like to do the same for windows. I have tried changing ".." and it didn't work.

Any help will be appreciated.

jecjackal
  • 1,407
  • 2
  • 20
  • 35

2 Answers2

3

It's is almost the same on Windows. You need the correct command, and you need to use back slash instead of forward slash

copy ..\..\..\Dir\Item.o Item.o
dbenham
  • 127,446
  • 28
  • 251
  • 390
0
copy ..\..\Dir\Item.o .

You need to use the back-slash as directory separators. . denotes the current directory

Attila
  • 28,265
  • 3
  • 46
  • 55