Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

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'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.


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?

share|improve this question

closed as too localized by KronoS, 8088, Renan, slhck Oct 6 '12 at 7:30

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.

Ensure you are using backslash and not forward slash as in your example. – Thell Oct 5 '12 at 18:02
Oh man that was exactly it! Works perfect now. – Eat at Joes Oct 5 '12 at 19:28
I'll put it in an answer so this can be closed out appropriately. – Thell Oct 5 '12 at 19:56
up vote 4 down vote accepted

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

share|improve this answer

Not the answer you're looking for? Browse other questions tagged .