LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #9   Report Post  
Posted to microsoft.public.excel.misc
Jim Cone
 
Posts: n/a
Default Please Help for a macro reading files not in sequence

Francesco,

It takes just a few seconds in Windows Explorer to manually copy files
from one folder to another.
Using code, you will have to determine the folder with the most files.
(Folder.Files.Count)
But since that doesn't guarantee those are the latest files, you will
have to check the DateLastModified property of each file and compare it to
each file in the other folders, before replacing it.
If you know for sure that the folder with the most files is the latest then,
you could use the CopyFolder method and set the Overwrite argument to true.

Details on all of this is in...
Microsoft Windows Script 5.6 Documentation
http://msdn.microsoft.com/library/de...ist/webdev.asp
The Script Runtime | FileSystemObject is the pertinent subject matter.

Regards,
Jim Cone
San Francisco, USA
http://www.realezsites.com/bus/primitivesoftware


"Francesco"
wrote in message

Thanks Jim,
I get them now in sequence but I had to open the file n.2 in A and the n. 6
in E and to save them again in theri folder and then now they are read in
sequence.
I do not inderstand the reason but it works now.

by the way , there is a way, if the folders in question do not have the same
number and type of files to to copy those missing from the most updated
folder ( supposing that C has 6 files and the others one 4 and one 5, to copy
those missing from the folder in C)
Thanks a lot for your help
Happy Easter
Francesco

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Macro to open files isn't updating correctly telewats Excel Discussion (Misc queries) 2 February 21st 06 09:04 PM
Macro that stores all sheets as tab-delimited text files [email protected] Excel Discussion (Misc queries) 2 February 14th 06 04:02 PM
Macro for multiple open files [email protected] Excel Discussion (Misc queries) 1 February 13th 06 03:25 AM
Macro to delete first line of 200+ files Bob Dobalina Excel Discussion (Misc queries) 2 May 26th 05 10:04 PM
Macro - - Automation Jac Excel Discussion (Misc queries) 8 December 27th 04 02:42 PM


All times are GMT +1. The time now is 06:41 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"