9

I've tried to use xcopy using relative paths and have had no luck.

I opened a command prompt as administrator. CD'd to my base directory where I want to xcopy a valid file from one location to another.

Steps:

cd c:\javascript_stuff\test\
xcopy "./editor/www/editor.js" "./rails/public/javascripts/editor.js"

I am prompted with,

Does ./rails/public/javascripts/editor.js specify a file name or directory name 
on the target (F = file, D = directory)?

No matter what I do I get 0 File(s) copied. I've tried numerous permutations of the xcopy switch's with no luck.

To confirm, the source file c:\javascript_stuff\test\editor\www\editor.js and the target directory c:\javascript_stuff\test\rails\public both exist.

I was hoping to add this to a build script so the path should stay relative to the directory the command is executed in.

Any thoughts?

Peachy
  • 638
  • 4
  • 18
Eat at Joes
  • 193
  • 1
  • 1
  • 4

1 Answers1

10

Ensure you are using backslash and not forward slash as in your example.

Thell
  • 432
  • 3
  • 7