Skip to main content
Trevor:
Legend
January 27, 2014
Question

Recent files list

  • January 27, 2014
  • 2 replies
  • 3059 views

Hi all,

I highly doubt that this can be done but....

Any chance of creating and saving a file without it being added to the recent files list.

Trevor

This topic has been closed for replies.

2 replies

January 27, 2014

Would it be possible to find all of the InDesign shortcuts from the Recent Items folder and save them to a temp folder somewhere? Then restore them when your script is finished making the new docs.

Might run into some kind of folder access issue, I just don't know.

Trevor:
Trevor:Author
Legend
January 27, 2014

Hi Robert

I'm not to sure what you mean there.

As I hinted in the first paragraph of 2 above restoring the list by opening them and closing them I think is dangerous.

And I don't think one can add to the recent list by adding menu items to it.

To be honest I don't even think one can access the list at all.  I have made a list of all menu items and the entries are not on it.

I'd be very suprised to be able to solve this one.

Thanks

Trevor

January 28, 2014

I'm by no means an expert in these matters, but what I was trying to say is in Windows 7:

var recentItemsFolder = Folder("~/AppData/Roaming/Microsoft/Windows/Recent");

var recentItemsArray = recentItemsFolder.getFiles();

Produces a list of all the items that appear in the Recent Documents lists of the applications that need it. Each item appears to be an alias. Some of them have names ending with ".indd."

So if I had to do what you are trying to do, I might:

1) move all of the .indd items to a temporary folder. Maybe .indl and .indt, too.

2) set app.generalPreferences.openRecentLength to zero

3) run the script that makes the new documents

4) restore app.generalPreferences.openRecentLength to what it was at step 2

5) move the ".indd" aliases back to the RecentItems folder

Never done it. Don't know how dangerous it might be. But it's crazy enough that it just might work.

Peter Kahrel
Community Expert
Community Expert
January 27, 2014

Maybe temporarily disable the recent file list in the preferences (app.generalPreferences.openRecentLength = ).

Peter

Trevor:
Trevor:Author
Legend
January 27, 2014

Nice thought Peter, but I tried setting it to 0 and then back to 10 after saving the file. The list is now empty, I don't know if it would be possible to  store the documents on the list and reopen (hidden) them and then close them to rebuild the list but I defiantly would not want to do that.

The script I am writing creates tens of documents which will wipe the recent file list.

I have come up with a partial solution of saving them all with the same name and renaming each file after it's creation so it only enters 1 entry in the list.

I don't think I can get around that.  Incrementing the list length is not an option.

Thanks for your input.

Trevor