Computing.Net > Forums > Programming > create 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.

create a batch file

Reply to Message Icon

Name: Udaykumarpatil2008
Date: March 4, 2009 at 23:16:28 Pacific
OS: Windows Vista
Subcategory: Batch
Comment:

I am new to batch programming and need some expert help. Here is what I would like to do:
1. I put any type of some files in one folder
2. Now I want to create a batch file in such a way that as I run the batch files it should copy all the files in that folder should copy in the specified different different folders
I kept both specific file & batch file in one folder & the program of batch file is as below:

Copy D:\uday\AWEMAN32.DLL c:\windows

3. But the problem is as I change the location of the directory “uday” the batch file does not work.

So please help



Sponsored Link
Ads by Google

Response Number 1
Name: Mechanix2Go
Date: March 4, 2009 at 23:50:48 Pacific
Reply:

:: If you want to specify the source directory:

@echo off & setLocal EnableDelayedExpansion

set /p src=src ?

copy d:\!src!\AWEMAN32.DLL c:\windows


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

M2


0

Response Number 2
Name: RobJohnB95
Date: March 5, 2009 at 12:07:20 Pacific
Reply:

go to my utube www.youtube.com/robjohnb95 and look at my 5 batch tutorials


p.s i know do C++ with visual basic


0

Response Number 3
Name: reno
Date: March 5, 2009 at 19:42:15 Pacific
Reply:

</b> Edit: thanks judago

QUOTE: I kept both specific file & batch file in one folder & the program of batch file is as below:
Copy D:\uday\AWEMAN32.DLL c:\windows

Copy "%~dp0AWEMAN32.DLL" c:\windows
or better yet
Copy AWEMAN32.DLL c:\windows


0

Response Number 4
Name: Judago
Date: March 5, 2009 at 22:15:54 Pacific
Reply:

bold

</b>
I just couldn't help myself. It may be a good idea to close html tags when you use them....


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: create a batch file

Create a batch file to rename text www.computing.net/answers/programming/create-a-batch-file-to-rename-text/14900.html

Help for create a batch file www.computing.net/answers/programming/help-for-create-a-batch-file/15796.html

Newbie creating a batch file www.computing.net/answers/programming/newbie-creating-a-batch-file/16676.html