WinBatch Tech Support Home

Database Search

If you can't find the information using the categories below, post a question over in our WinBatch Tech Support Forum.

TechHome

File Operations

Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.

How to Copy Files and Archive Attribute

Keywords: 	  archive attribute

Question:

I've changed the xcopy.wbt in order to copy all the files of one directory and all its subdirectories to only one directory. But I can not figure how to deal with the archive attribute.

I do not want to change the ATTRIBUTE to A but to change the ARCHIVE ATTRIBUTE BIT, that is, each time I copy files it copies only those that are new or modified, like in DOS XCOPY command with /A (that doesn't change the archive bit) or /M (that changes it).

Answer:

I think you need to simply change the FileCopy to the FileCopyAttr function with the correct parameters
	FileCopyAttr(source,Dest,@False,"A")
to always set the Attibute bit on the copy.
Article ID:   W14151
Filename:   Copy Files and Archive Attribute.txt
File Created: 1999:06:09:14:37:42
Last Updated: 1999:06:09:14:37:42