Computing.Net > Forums > Programming > Making a batch file

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

Making a batch file

Reply to Message Icon

Name: Psychokitty
Date: January 6, 2008 at 20:28:06 Pacific
OS: WindozeXP Home
CPU/Ram: Does not matter
Product: Does not matter
Comment:

I am wanting to make a batch file that will do several things.

Take a certain file folder (and all its contents) from a certain location and delete it. Then copy over another file folder (and all its contents) into the same folder I just deleted the file folder from. Last but not least I want that folder that was just copied renamed to something else.

Example:

Delete D:\Game\SpecificFolderAndAllCOntentsFromHere
Copy Folder From
F:\NameOFFolderIWantCopied
Rename Folder Just Copied to AddOns

Can anyone help me in this grand scheme please? If you just show me one I can make the other two by copy and pasting. I am at a loss at how to do this I am not very computer minded. I have looked but have not found any that give specific examples on several pages that google found me. This is intended to help me set up a game I play so that it is configured for the activity I am wanting to do.



Sponsored Link
Ads by Google

Response Number 1
Name: Mechanix2Go
Date: January 6, 2008 at 23:18:10 Pacific
Reply:

deltree y:\old
xcopy x:\stuff y:\new\


=====================================
If at first you don't succeed, you're about average.

M2



0

Response Number 2
Name: klint
Date: January 7, 2008 at 03:12:48 Pacific
Reply:

The deltree was removed in Windows NT and newer systems. You can use RD /S instead. The RD /S command will ask you if you really want to delete the whole diretory tree. If you don't want that, you can use RD /S /Q (quiet but very dangerous mode!)

rd /s /q y:\old (warning: use with caution)
xcopy /e x:\stuff y:\new\
ren y:\new AddOns


0

Response Number 3
Name: Psychokitty
Date: January 7, 2008 at 10:21:49 Pacific
Reply:


rd /s /q E:\World of Warcraft NEW\Interface\AddOns
xcopy /e U:\AddOnsFARM E:\World of Warcraft New\Interface
ren E:\World of Warcraft New\Interface\AddOnsFARM AddOns


so this would be correct?


0

Response Number 4
Name: klint
Date: January 7, 2008 at 11:42:20 Pacific
Reply:

You need quotes around any paths that contain spaces, such as "E:\World of Warcraft NEW\Interface\AddOns"


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Programming Forum Home


Sponsored links

Ads by Google


Results for: Making a batch file

need help making a batch file work www.computing.net/answers/programming/need-help-making-a-batch-file-work-/14441.html

How to make a batch file type text www.computing.net/answers/programming/how-to-make-a-batch-file-type-text-/11493.html

how do u make a batch file non-veiwable? www.computing.net/answers/programming/how-do-u-make-a-batch-file-nonveiwable/19532.html