Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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?

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
add comment

1 Answer

up vote 2 down vote accepted

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

share|improve this answer
add comment

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