Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 441
Default Tell OS to refresh?

Is there a way, say after a file has been renamed using code, to force the
operating system to refresh so that it recognizes the change in the file name?

Or do I need to pause my code for a few seconds to give it time to do this?

Thanks much in advance.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Tell OS to refresh?

A file is renamed by saving it with a new name. The OS shouldn't have to
refresh since part of saving it includes writing that information to the
directory.

What are you trying to do that is causing problems?

--
Regards,
Tom Ogilvy

"quartz" wrote in message
...
Is there a way, say after a file has been renamed using code, to force the
operating system to refresh so that it recognizes the change in the file

name?

Or do I need to pause my code for a few seconds to give it time to do

this?

Thanks much in advance.



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 441
Default Tell OS to refresh?

I am working on a utility for users to re-organize large numbers of files. It
allows the user to select multiple files in a folder (using file picker). The
utility then prompts for a new name. The program loops through the array of
file names and changes the name of each file to the new name and appends a
new sequential number at the end.

I was getting an error indicating that a file with that name already exists,
even though the counter was incrementing, but I just found an error in my
code that fixed it.

Sorry - please disregard. Thanks for your time.

"Tom Ogilvy" wrote:

A file is renamed by saving it with a new name. The OS shouldn't have to
refresh since part of saving it includes writing that information to the
directory.

What are you trying to do that is causing problems?

--
Regards,
Tom Ogilvy

"quartz" wrote in message
...
Is there a way, say after a file has been renamed using code, to force the
operating system to refresh so that it recognizes the change in the file

name?

Or do I need to pause my code for a few seconds to give it time to do

this?

Thanks much in advance.




Reply
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
Copy Excel functions formula and auto refresh refresh Pauline Cheong Excel Worksheet Functions 3 February 16th 09 01:23 AM
Create refresh button in worksheet to refresh Pivot Table Data Ron Excel Worksheet Functions 1 October 13th 07 01:20 AM
Timing of automatic query refresh and macro pivot table refresh dutty Excel Programming 2 December 1st 04 07:19 PM
Pivot Table REFRESH Flaw -- Saves Old Data in Selection Area AFTER REFRESH Ken Roberts Excel Programming 3 September 11th 03 06:02 AM
Excel does not close from VB!! (when i refresh Refresh query with BackgroundQuery:=False) Anant[_2_] Excel Programming 1 August 6th 03 04:22 AM


All times are GMT +1. The time now is 06:11 PM.

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

About Us

"It's about Microsoft Excel"