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

Author Topic: Need batch file  (Read 2359 times)

0 Members and 1 Guest are viewing this topic.

tonygee

  • Guest
Need batch file
« on: June 14, 2006, 03:44:41 PM »
I need a rather simple batch file!!

I want to check for a particular file in a folder - example  "aaa.txt" and if found rename it to "ccc.txt". If I don't find "aaa.txt" - check for "bbb.txt" and rename to "ccc.txt".

That's it -- Any help will be appreciated.

almn

  • Guest
Re: Need batch file
« Reply #1 on: June 14, 2006, 05:28:36 PM »
Welcome to the forum  :)
it would be
if exist aaa.txt (
ren aaa.txt ccc.txt
) else (
ren bbb.txt ccc.txt
)

I am assuming that bbb.txt will be present and that the file is ran from the same directoty as the files.
All that information canbe found easily just google ms dos help

Almn