Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: can you help me about using dos move command to move directory?  (Read 7553 times)

0 Members and 1 Guest are viewing this topic.

spdsptuan

  • Guest
I want to use "move" command to move directory.
Example: move [data] from C drive to D. D drive hasn't [data].
I tried using "move" like this:
move c:\data\ d:\data\
But it errors "Access is denied".
I don't know why. But when I move directory from one location to another in one drive (such as C or D). It's ok. And if I move files from one drive to another, it's ok too. But only directory, It errors "Access is denied".

Can you help me please? I'm a newbie, my english is not good. Hope you understanding.

Thanks a lot! ;D

billrich

  • Guest
Re: can you help me about using dos move command to move directory?
« Reply #1 on: July 13, 2009, 02:20:36 PM »
Until your code works as you want, use xcopy or copy. ( you may later erase the source files ).  Move erases source code as you go.

Play with xcopy until it does what you need.

Good luck

p.s.  Log in as the system administrator, the "access denied" should not be a problem.  Copy files and not directories. Be safe and not sorry. 

BatchFileBasics



    Hopeful

    Thanked: 18
    Re: can you help me about using dos move command to move directory?
    « Reply #2 on: July 13, 2009, 02:23:37 PM »
    well i can't see why move isn't working for me either.

    but xcopy works just the same.

    I have a folder named hello there:
    Code: [Select]
    Directory of C:\tests\hello there
    07/13/2009  01:12 PM                10 file1.txt
    07/13/2009  01:12 PM                10 file3.txt
    07/13/2009  01:12 PM                10 file4.txt

    then you can use xcopy and /e to copy all directories.

    Code: [Select]
    xcopy /e /y "c:\tests\hello there" "f:\hello there"
    this should be it for as far as the move command goes
    When the power of love overcomes the love of power the world will know peace - Jimi Hendrix.