Jump to content

How Force a File to Close for Renaming on Windows


This topic is 3033 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Hi Everyone-

We have a wonderful updater for our vertical market product that is incredibly fast and visually clear.  It basically imports all of the customer data into a clone which is delivered from a container.

Once the clone has received all the user data we want to rename the old copy ( and put it into an ‘Archive’ folder) and the rename the new version’s copy.

We use Nick’s Base Element plugin. On the Mac it works flawlessly and fast.

On Windows, it always fails! Grrrrrr.

Apparently, in our script, ‘Move and Rename’ which moves and renames the two files, the script causes the two files to open. And on Windows, an open file can not be renamed or moved.

We have tried to close the two files inside the 'Move and Rename' script, just before the Plugin calls.  But it still fails.  And, if you Halt the script immediately after the the two ‘Close File’ steps, the two files remain open. 

How in the world can I force the files to close, even for a moment, so Nick’s plugin will work?

Thanks in advance.

Link to comment
Share on other sites

This topic is 3033 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.