|
-
Jul 18th, 2000, 08:31 AM
#1
Thread Starter
Evil Genius
Realise I have had a question today already, this one is to do with copying files from 1 location on a hard drive to another. & I am slightly 
I can use the fso.copyfile property to foce or leave overwriting files. That bit's fine. BUT....
I have been asked for a third option of overwriting only files which are newer. Now I would class myself as an intermediate VB'er, but am stumped with this.
I think I need to use the getfileinfo API call, but anyideas how to loop for each file in a directory, check it's version / modified object (not even sure which method to look at) & either overwrite or leave it ????
PLEASE HELP ANYONE!!! Any small pointers of what I could look at / read into would help, thank you everyone!
Alex Read 
-
Jul 18th, 2000, 08:35 AM
#2
Fanatic Member
If you are already using the FSO, then you can use the following properties of the File object.
DateCreated
DateLastModified
Iain, thats with an i by the way!
-
Jul 18th, 2000, 08:44 AM
#3
Fanatic Member
use a file box with the local files in it
for a = 0 to file1.listcount-1
if dir(remotepath+file1.list(a))<> "" then
if filedatetime(remotepath+file1.list(a))<> filedatetime(localpath+file1.list(a)) then
kill remotefile
copythefile
end if
else
copythefile
next a
Kurt Simons
[I know I'm a hack but my clients don't!]
-
Jul 18th, 2000, 08:51 AM
#4
Thread Starter
Evil Genius
response
Thank you, both replies have helped!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|