×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Batch Files

Batch Files

Batch Files

(OP)
Im not sure if this is the write place to ask this but, does anyone no where I can go on the net to learn how to write basic batch files?

RE: Batch Files

Not sure about finding a site on the net but I'd suggest going to a large library.

For BATCH files for Windows, try looking for MS-DOS (vers. 6.x and BELOW) books to start.

For BATCH files for Networks, try using the command prompt (such as: "NET /?").  IF you have access to the OEM disk(s) snoop around for help files (in older ones they may be in .TXT or .ASC files)

If you are talking about BATCH processing through another program (like Sidekick, PCTools, WildCat, etc.) you'll need to get those programs' help files (if any) and/or manuals.

You may want to also try a technical college's / university's library or (if you want to buy) try either the school's bookstore or maybe Amazon.com .

Hope this helps narrow down the field a bit.
--MiggyD

RE: Batch Files

I cannot understand why there isn't a Forum on tek-tips for Microsoft O/S Scripting, Commands and Batch Files!

From DOS to XP, there are many common commands which do almost everything that you need to do with your files and more. When you want to do something fast, clever, without having to do a lot of programming to get it done, the command line is the best place to go!

For a lot of good stuff, http://www.robvanderwoude.com/ is an excellent place to start.

In Google: "Batch Files" gets lots of references.

Post your support for a Batch Files forum here!

RE: Batch Files

> I cannot understand why there isn't a Forum on tek-tips for Microsoft O/S Scripting, Commands and Batch Files!

I don't see the need to have such a forum.  DOS programming/scripting isn't quite as popluar or used often enough in regular everyday business functions (the applictions take care of that).  The 'AVERAGE USER' has no need to understand the intricacies of the OS; so long as it does as they ask.  

I guess it doesn't hurt to have something to fall back on, if the GUI fails, but I still don't believe this alone should warrent a whole forum dedicated to OS scripting and batch-making.

--MiggyD

RE: Batch Files

This thread, MiggyD, is titled Batch Files. The best link in Google is to use "Batch files" (with the quotes) as the search term.

There are several other threads in various forums here which start with something like "Need help with .Bat file" etc.

To misquote you - The applications should take care of that - many don't! Many are written without thought to real users needs. I had an email recently which went:
"Although you can image sequentially on a timer like the old version, whatever you instruct the software to call the sequence of file names is ignored in the dialog box. So instead of producing a sequence called Blog001.img, Blog002.img etc, every set of files is labelled NEW001.img, NEW002.img etc. Renaming these manually in Explorer is going to be a major pain in the !@*#"
The answer was of course (under WindowsXP) to use the REN command. Since this was to be a routine problem, I suggested that the user checked out Batch files, and wrote one called process.bat that would be used by typing "process blog" in order to create a new folder called "blog", rename the NEW*.img files to blog*.img and move these files to the new blog folder. Although the user has limited VB experience, and zero on batch files, he had little problem in finding out how to pass an argument to the batch file, to use the md, cd, ren, and move commands to reach the solution he needed.
I didn't actually write the file for him because it was a good opportunity for a learning experience, and he agreed.

Forgive me, but Tek-Tips states "Technical Work Forums for Computer Professionals" not 'AVERAGE USER', and 60-odd commands hardly expose the intricacies of the XP OS!

Now , a challenge, MiggyD, if you are up to it!
As Top Expert of this forum, I guess you must be a bit of a whizz with BASIC, eh?

On the link on my previous post, on the batch files page on that site, there is a 2k download of a batch file which is called "allhelp.bat". It works in NT, 2000 and XP to produce a html page with links to help for all the commands available at the operating system command prompt. The source is also on the site.

Can you write a BASIC program to do the same? If you can, which is the fastest, the batch file or the BASIC program?
Good luck!

RE: Batch Files

>Post your support for a Batch Files forum here!
Agree.
There is a (right) tool for each job - and there is a jobs that require batch-files.
At least I think so.

RE: Batch Files

That's two of us then, Tsh, Thankx

RE: Batch Files

AH HA!,

i knew there was an interest in o/s commands....ive been looking for a site to post questions...im no vba programmer or c+ or anything, but i have (over the past year) been learning the ins and outs to Win2000 batch files....Lets just say you can do ALOT with the commands available. Everything from registry hacks to MSI manipulation. Ive become really good at batch files...

I have a question for anyone who may know:
i rely on the xcopy command to keep branch offices (over a wan) up to date on files and the xcopy seems to be the command to use..but i run into some problems.
sample:
xcopy "\\xxwinfil\data\Projects\301470-1\dwg\xxxx.xxx" "\\xxwinfil\data\Projects\301470-1\dwg\" /d/f/r/y
problem is: the /d (if left blank) is supposed to check source vs. destination and only copy the file if it is newer than the destination...it doesnt if logged in as admin. but works if im logged in as a user...weird.
second: the /r is supposed to copy over read-only destination files. it dont. it gives a "sharing violation" error.

usually when im logged in as admin im transfering large files, could it be that the /d times out due to the delay between servers? or some weird rights issue?
any ideas?
thanks
cdc

RE: Batch Files

I have a problem, I skipped win2000, and don't know if there are variations between 2000 and the XP version of xcopy. There do not appear to be any differences for the switches you use. I believe you are correct in thinking that the problems you have are explicit permissions problems. A few months ago we upgraded the department to XP and the IT Network admin had no end of problems accessing and transferring files as admin from some machines, whereas users granted full rights over certain folders on the server had no problems accessing, moving and copying what they were permitted to. It seems to be a matter of making sure that the Admin account permissions are fully propagated across the system.

I shall be emailing forummanager@tek-tips.com to ask for a new forum, or forums to be put in the Operating systems area - called something like Batch Files and Windows Scripting.
I would ask you to do the same, there are hundreds of enquiries about batch flies across these forums. See you there!

RE: Batch Files

I've got just the program to help you -in fact I found it so useful that I registered it.  You can find it at www.octosoft.co.uk it is called easy batch builder.  Very good and professionally produced the free version is fully functional except there is a 15-use limit to it.

RE: Batch Files

flyboytim, i couldn't agree with you more.  i work in an organization that lives for batch files despite having access to higher level languages and programmers that can write in those languages.  instead, they want to write batch files that i never had to learn and never took the time to teach myself.  i know i would use a forum like you suggest.

RE: Batch Files

Strange that the moderators of this forum cannot decide where to put such a forum.Personally, I think under "Desktop Software, Operating Systems, Microsoft Scripting Languages, Command Line Batch Files" as opposed to "..., Windows Scripting Files". I think that this would be cross-platform enough to cause cross-fertilization of ideas and tap the mighty skills of the users of this excellent site to the benefit of all.

RE: Batch Files

In my work I routinely write large batch driven upgrades to distribute files to 7,000+ computers running MS-DOS 6.2.

One thing to note is that Batch scripting underwent a radical change with NT 4.0. Every windows OS since then has has several commands that were not available in MS-DOS batches.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close