Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Help creating 2 batch files

Status
Not open for further replies.

AccessGuruCarl

Programmer
Jul 3, 2004
471
US
Hello All,

I need help building 2 batch files.

One to verify a file exists in the folder "xxx.txt", if so, verify if file exists "xxx.ldb", If .ldb file exists, send message to user to quit the current access file. If the .ldb file doesn't exist, rename the .txt file to a .mdb file.

The second file I need is to copy a folder and it's sub-folders from a cd to the users c: drive, then remove the read-only attribute from a .mdb file in the folder just copied.

Can these be done with a batch file?

Any Help Greatly Appreciated!

AccessGuruCarl
Programmers helping programmers
you can't find a better site.
 
I was able to build the 1st batch file with some samples on the net.

So I only need help with the second, changing the read-only attributes, and copy a folder with a subfolder.


Thanks

AccessGuruCarl
Programmers helping programmers
you can't find a better site.
 
Use the native xp command XCOPY.EXE
(By default, xcopy removes the read-only attribute.)

For CD drive on drive letter d:
For target of the copy drive letter c:

xcopy d: c: /i /s /e /y



____________________________
Users Helping Users
 
Also, if you still need to change file attributes, see the "attrib" command.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top