• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Can someone write a script that goes through all folders in Bridge and Purges the Cache for each one

Guide ,
Jul 07, 2007 Jul 07, 2007

Copy link to clipboard

Copied

Can someone write a script that goes through all folders in Bridge and Purges the Cache for each one of them?

The Purge command in Preferences does not work; period. It appears to clear the thumbnails, but NOT the fields that appear under each thumbnail in the Content panel.

Only the Purge the Cache for 'foldername' in the Tools menu does the job.

As someone who can't script my way out of a paper bag, I'm wondering whether it's possible to write a script to go executing that command folder by folder, including all subfolders..

Any and all input is welcome.

Thanks in advance.
TOPICS
Scripting

Views

1.7K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Jul 09, 2007 Jul 09, 2007

Copy link to clipboard

Copied

Ramon,

Is there a specific property under the thumbnail that you are not seeing purged when you use use the Purge Cache button in the preferences panel?

Through scripting it should not be necessary to go folder by folder. Save the following script as a new .jsx file and double-click on its Thumbnail in Bridge to run it.

#target bridge
app.purgeAllCaches()

-David

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guide ,
Jul 09, 2007 Jul 09, 2007

Copy link to clipboard

Copied

Hi David,

Thanks for responding.

>Is there a specific property under the thumbnail that you are not seeing purged when you use use the Purge Cache button in the preferences panel?

It's the properties that were not there to begin with, i.e. those that were not there from the cache being built by earlier versions (prerelease) or before I began using the the Color Profile box. The ones most often missing are the Creation and Modification dates as well as the Color profile.

They will NOT be shown by the Purge Cache button in the preferences panel, but they do get properly shown under the thumbnails when the cache is re-built through the Tools menu > Cache > Purge Cache For 'thisfolder' command. I'd say it's a (minor) bug.

I'm very thorough with my system maintenance, run Cocktail daily (to run the Cron Scripts, delete caches, rotate logs, etc), Repair Permissions before and after any software upgrade, run DiskWarrior, run fsck- fy from time to time, keep the temperature inside the case down through napping (CHUD), etc.

Dual bootable, DP MDD 1.25GHz G4 (2004), maxed out at 2GB of RAM, both Spotlight and Dashboard disabled, Photoshop scratch disk on dedicated internal drive, at least 100GB available on each of the internal drives. Will be upgrading the graphics card in two weeks (currently nVidia GeForce 4 Ti 128MB).

Will try your script. Thank you.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guide ,
Jul 09, 2007 Jul 09, 2007

Copy link to clipboard

Copied

Oooops! The Apple Script Editor returns a syntax error. I guess that's not what I'm supposed to be using?

Like I wrote in the OP: "As someone who can't script my way out of a paper bag"

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Jul 09, 2007 Jul 09, 2007

Copy link to clipboard

Copied

Ramon,

You can download the Bridge scripting guides by getting the Bridge CS3 SDk:

http://www.adobe.com/devnet/bridge

They should help you get out of the paper bag.

-David

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guide ,
Jul 09, 2007 Jul 09, 2007

Copy link to clipboard

Copied

Thanks. :)

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guide ,
Jul 09, 2007 Jul 09, 2007

Copy link to clipboard

Copied

Well, this is one messy bug in Bridge. :(

I did manage to save the script and execute it from the Bridge Content panel, but it looks like it's calling on the Purge command in Bridge Preferences, not the tools menu.

The result is that I now have to go into each darned folder manually and run the command from the tools menu again. The creation data is now missing from under all the thumbnails in all folders.

Frankly, I'm not looking forward to re-doing all that tedious manual work. :/

Prior to posting here in this thread for the first time, I had already fixed several dozen folder by running the Cache>Purge command in each of those folders. Now running the script as per your instructions has undone all hard work.

I'm uploading the saved script here ; if you would be so kind as to examine it, I would be much obliged.

For the time being, I'll be deleting all traces of it from my hard drive. What good is it if it still calls on the lousy Purge command in Preferences instead of the one in the Tools menu?

Bummer.

The bottom line is that Cache management in Bridge is still in need of a lot of work. :/

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guide ,
Jul 09, 2007 Jul 09, 2007

Copy link to clipboard

Copied

The Build and Export Cache in the Tools menu > Cache command does NOT restore the creation date under the thumbnails. Nothing short of using Tools > Cache > Purge cache for 'this folder' will restore the lost creation date.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Jul 10, 2007 Jul 10, 2007

Copy link to clipboard

Copied

You have confirmed something that I suspected might be happening because of the numerous posts on the subject of caches.

It seems that we just need to do any necessary purging folder by folder for the moment which is the way that I have been working.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Jul 10, 2007 Jul 10, 2007

Copy link to clipboard

Copied

Are you using distributed cache or centralized cache?

If you are using centralized cache you can manually delete the centralized cache.

1. Go to Bridge Preferences, Cache
2. Note the Cache Location.
3. Quit Bridge
4. Delete the Cache folder.
5. Relaunch Bridge

Ramon, you stated in your post on 1:51pm Jul 9, that you were only seeing a problem with files cached by pre-release Bridge builds. Have you seen the problem occur with files that were not previously cached by pre-release builds?

-David

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guide ,
Jul 10, 2007 Jul 10, 2007

Copy link to clipboard

Copied

David,
> Are you using distributed cache or centralized cache?

Distributed.

>Have you seen the problem occur with files that were not previously cached by pre-release builds?

After running the script, I am seeing the problem in all my folders, without exception. Even folders for which I had purged the cache previously and were already showing all four lines (creation date, modification date, pixel dimensions, color profile). Now all of them, in every single folder on my internal and all external FW drives that were mounted at the time the script ran. The creation date and color profile fields were nuked by the script. :/

I'm in the process of rebuilding the cache folder by folder. It will take me weeks to get things back to normal.

On second thought, I might as well wait for the next dot release. I can't imagine the Adobe Bridge team not fixing this, and a new version may fix the problem globally. (Hope, hope.)

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Jul 11, 2007 Jul 11, 2007

Copy link to clipboard

Copied

Ramon,

So I can investigate this further, can you zip-up and send me a URL to download one small folder of files, including the distrubuted cache files?

Thanks,
David Franzen
dfranzen@adobe.com

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jul 11, 2007 Jul 11, 2007

Copy link to clipboard

Copied

Hi Ramòn,

You can select Edit > Show Hidden Files to show the hidden cache files. The cache files are named as ".BridgeCache" and ".BridgeCacheT". Please use our search tool by Edit > Find... and look for all the cache files on your hard disk. Please check "Include Non-indexed Files" to find all the folders. When they are found, you can check the location by File /Context > Reveal in Bridge to make sure that you want to delete them.

Goichi Kitazume
goichi@adobe.com

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guide ,
Jul 11, 2007 Jul 11, 2007

Copy link to clipboard

Copied

Thank you both for responding.


* David,
>zip-up and send me a URL to download one small folder of files, including the distrubuted cache files

I'll try finding a "small" folder file with the cache problem. It won't be easy. I would exceed my FTP allowance with my ISP, but I can either use yousendit.com to email them to you, or you can provide me with a temporary password for the Adobe FTP space.

- - -

* Goichi,

Good suggestion, I'll try that. Hope the search doesn't bring Bridge to its knees. :D

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guide ,
Jul 11, 2007 Jul 11, 2007

Copy link to clipboard

Copied

David,

Sent you an email with a zipped archive of a folder of inconsequential JPEGs that shows the problem. I stripped the ".zip" extension.

Let me know if that helps.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guide ,
Jul 20, 2007 Jul 20, 2007

Copy link to clipboard

Copied

Just for the record, the script suggested by David does indeed use the Purge Cache button in the Bridge preferences, not the Tools menu > Cache > Purge Cache for 'foldername' command.

We corrected our initial miscommunication by email. (Thank you, David.)

David explains that the Tools menu > Cache > Purge Cache for 'foldername' command is designed to clear distributed caches in the folder, while the Purge Cache button in the Bridge preferences is designed to clear only the central cache.

The unfortunate apparent bug (at least on my system) remains, in that the cache that is rebuilt in each folder after using the Purge Cache button in the Bridge preferences, rebuilds improperly. It always leaves out the Date Created line under the thumbnails in Bridge, and occasionally (rarely) leaves out the Color Profile line.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Jul 14, 2023 Jul 14, 2023

Copy link to clipboard

Copied

I'm working in a script to convert some files and, after the convertion, the folder has no thumbs to display (but Windows Explorer shows everything ok). If I manually go to the Tools > Cache > Purge cache to this Folder, it works. But I need this working in my script.

 

Any help will be appreciated.

Thanks in advance.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jul 14, 2023 Jul 14, 2023

Copy link to clipboard

Copied

Looking at Bridge 2023 JavaScript Reference, p. 65, this should purge the cache for the current folder:

app.document.chooseMenuItem("PurgeCache");

However, I can't get it to work.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Jul 14, 2023 Jul 14, 2023

Copy link to clipboard

Copied

Same here. I can't get it to work.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jul 14, 2023 Jul 14, 2023

Copy link to clipboard

Copied

LATEST

I can get this to work:

app.document.chooseMenuItem("PurgeCacheForSelected");

 

You could selectAll then PurgeCacheForSelected

app.document.selectAll();

app.document.chooseMenuItem("PurgeCacheForSelected");

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines