# DOS commands problem



## DonaldG (Aug 23, 2007)

*[Resolved] DOS commands problem*

Its not rocket science but....
Platform: Vista Ultimate
Drives C & D Internal sata drives
Drives G & J external USB2 drives

I have a need to make a duplicate copy of certain directories and their contents onto the external drive or drives. I do not want to zip/rar or otherwise compress them. 

On a daily basis I want to incrementally copy the any new or modified files into the appropriate directory on, say, drive G (external USB)

In the days of XPsp2, I did do this by way of a simple DOS batch file I created. It worked very well.

I now want to use this dos batch file in Vista Ultimate but I have been stuck at the first hurdle!

In the Command Prompt, from the 'users root" (C:\users\Donald>) I can change directory to drive C no problems...\But I cannot change directory to any other drive!

EG:
C:\Users\Donald\cd c:\
results in:
c:\>

But:
C:\Users\Donald\cd g:\
results in:
C:\Users\Donald>

Also:
C:\>cd g:\
results in:
c:\>

Anyone have clues as to what is going on?

Or do I have to give up DOS batch files in Vista?


----------



## Narshil (Mar 7, 2008)

thats weird.

i cant think of a reason for that behavior but when i read your question i remembered a piece of software from Microsoft that does just what you want to do. its called SyncToy, here is the link:

http://www.microsoft.com/downloads/...54-C975-4814-9649-CCE41AF06EB7&displaylang=en

if you totally, absolutly, want to do it with a batch file then your gonna have to wait for someone else to answer but i thought this "toy" could be helpfull to you, let me know if you decide to give it a try

(edit) if you do decide to try it out make sure you read the documentation, the application is pretty usefull in my opinion but you wanna make sure you use it correctly to avoid headakes (like finding out your files got erased from you backup folder when you deleted them from you source folder because you set the sync to "sync" mode instead of "contribute" mode).


----------



## DonaldG (Aug 23, 2007)

Thank you, Narshil and a very warm welcome to the TSF forum. :wave:

I will take a look at that programme that you suggest. I appreciate your answer.

It is weird, the way the DOS is not working as expected. The mini utility I wrote that works well in XP is based on the XCOPY command and I was converting it to utilise the ROBOCOPY command which has superseded xcopy. But if I cannot span across 2 external usb drives then it's no good.


Many thanks & regards
Donald

EDIT: 
Narshill. I have just had a read of the specifications and it looks as if it is just the job. Thank you for pointing me to it.

As an ex-professional photographer & now, keen amateur photographer, I have something like 40,000 images to backup onto two separate drives AND incrementally add to them. I just want a plain copy of the files, as is, without compression, encryption or anything. I need the original file and folder date/time to be preserved too.

As a side note, on Tuesday morning I ordered another 500GB external because my 120GB was getting full. I transfered (synched) it to a 350G external. Within minutes of finishing the synch, it died!  I feel very vunerable at the moment having all those photos on one drive only. I hope the new one gets delivered today...

Cheers :wave:


----------



## sobeit (Nov 11, 2007)

if I am reading your examples correctly they are wrong. you do not put cd before a drive change. its not cd g:\ its just g:\(folder) so if you want to copy something from c to g its 
copy c:\(folder) g:\(folder)


----------



## DonaldG (Aug 23, 2007)

Hi Dan

scenario: to test that I have the syntax right, i open dos box from Vista which presents me with:

C:\Users\Donald>

I now test to see if I can change diriectories and drive. And as proof of all being well, I want to isue the DIR command.

So, I type in

C:\Users\Donald>*CD C:\*

& it gives me the C root directory prompt:

C:\>

So far so good...

I want to change from Drive C to Drive D. At the C prompt. I type:

C:\>*CD D:\*

Which should get me into the ROOT of D. Insead of seeing the D drive prompt, it gives me the C prompt back with no dos error or anything:

c:/>

I am totally mistified. Is my DOS broken - I can only hope that someone else with vista can echo my test...

BTW: the D drive is an identical internal sata 500g internal it the C drive, which I can read as normal in File Explorer


----------



## sobeit (Nov 11, 2007)

DonaldG said:


> Hi Dan
> 
> scenario: to test that I have the syntax right, i open dos box from Vista which presents me with:
> 
> ...


your dos is not broken, and you methodology is wrong. the reason why C:\Users\Donald>CD C:\ is going into your c root, is because it is ignoring part of it which is also why when trying using other drive letters its going into c root. 

If you do it as I suggested in my previous post,you will be able to move your files to your different drives - if typed correctly.


----------



## DonaldG (Aug 23, 2007)

Hello again DOS guru ray:

It has just dawned on me why it all failed! Of course the *Commands *must be carried out from the users root, in my case: *C:\Users\Donald>*

The command:
C:\Users\Donald>*CD C:\ *succeeded because it is in the 'command' root. and resulted in:
C:\>

Now I am out of the command root and and further command will fail!


I set up a 'test' directory with 1 file in it and did:

C:\Users\Donald>*copy c:\test d:\test*

It worked just as you said it would.

Thank you for making me think a bit harder... It has been a few years since I did DOS...

Many thanks Dan


----------



## Narshil (Mar 7, 2008)

WOW lol, it seems like im a bit rusty on that console as well. dont know how i missed that hehe

well, you should give that application i told you about a try anyway, im gessing youll like it. it does the sync in the background and has some other nice stuff i dont remember right now

also, if what you are worried about is not loosing you data it migh be worth a shot trying out a HD raid setup, i forgot wich one is it, raid 0 or raid 1. all i know is one of them is to speed up HD access and the other one duplicates your data on both hard drives, so if one goes south the other one still has everything. its a bit more complicated than just backing up stuff but i think it is the best way to make sure you allways have a working copy of your OS and your files.

oh and thanks for the wellcome


----------



## DonaldG (Aug 23, 2007)

HI Narshil

I must admit, I feel a bit of a wally for not thinking of that much earlier!

I have had enough of raid - never again. (Personal issue!)

However, I did have a look at the SynchToy programme you suggested. In fact I downloaded the next one up - They have released V4.0 beta. My 500Gb external drive arrived (FAT32 that took 4.5 hours to reformat to NTFS). Last night I tested SynchToy 4 and copied 88Gg of photos over & just now another 56GB of programmes, downloads and data. It all went smoothly.

Certainly a huge improvement over my old DOS batch file! Thank you for letting me know about it. I am very much obliged. My Backup & Synchronising problems are now solved...

Cheers.
Donald


----------



## Narshil (Mar 7, 2008)

no problem, glad i could be of help.

Santiago


----------

