Javascript no longer purges temp files

Community Beginner ,
Mar 17, 2022 Mar 17, 2022

Copy link to clipboard

Copied

For 3 years I've been using Java scripts in a large project with no problems. I have a few hundred near identical javascripts (just the output paths for saving are different). The files takes the open document which has a few hundred variables assigned, swaps them out, saves a jpeg, PURGES HISTORY, and then goes on to the next data set. Usually there are a few hundred data sets it goes through and takes a few hours. Anyway, it seems, maybe based on photoshop updating, that "app.purge (PurgeTarget.HISTORYCACHES)" no longer clears those temp files on the scratch disk. Manually going Edit>Purge>All will clear them - but doing it manually is not an option for so many files. 

 

When I'm running these data sets, it obviously fills up the scratch disk now. Is there a work-around or some updated javascript code I could put in my file?

TOPICS
Actions and scripting

Views

151

Likes

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
LEGEND ,
Mar 18, 2022 Mar 18, 2022

Copy link to clipboard

Copied

Likes

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 Beginner ,
Mar 18, 2022 Mar 18, 2022

Copy link to clipboard

Copied

I ran my normal scripts and began filling up the scratch disk with multiple 67GB files (which it shouldn't do, usually theres's one the entire time). Then I assigned f8 to purge, and ran the script you linked to to see if it did anthing. It did it's thing but the temp files stayed and one got bigger. 

Likes

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
LEGEND ,
Mar 18, 2022 Mar 18, 2022

Copy link to clipboard

Copied

With held Ctrl?

Likes

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 Beginner ,
Mar 18, 2022 Mar 18, 2022

Copy link to clipboard

Copied

It's Ctrl+F8, I just forgot to type it in my reply up there. So - I have an update. I tried it on my local machine (as opposed to a server I tried it on earlier) and it seemed to work... although I wouldn't want the popups of checking file size and all that. Is there a smaller version of the script that wouldn't ask me questions, just run?

Likes

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 Beginner ,
Mar 18, 2022 Mar 18, 2022

Copy link to clipboard

Copied

Update again: I think it's working now. I commented out the 'alerts' in the script. I don't know if I should be commenting out anything else but it's working so far. Part of the original java script I was working with calls an action from photoshop. I added the running of the new purging script to that action, so I don't have to modify my java script files to do the purge. (good, because there are hundreds).

Likes

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
LEGEND ,
Mar 18, 2022 Mar 18, 2022

Copy link to clipboard

Copied

I have no idea if it is going to work to a server as opposed to local machine.

Likes

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 Beginner ,
Mar 18, 2022 Mar 18, 2022

Copy link to clipboard

Copied

Update #3. It is actually not really working. I'm basically running my datasets and watching a file browser of the temp files. They appear and disappear, but overall, they increase until they don't disappear and slowly climb in size and numbers. So I think the script sort-of works, but just not enough. The hard drive still fills up. This is the case with all 13 servers I'm running data sets on. I firmly believe it's a Windows update thing. Windows doesn't seem to be allowing a javascript to purge the files correctly anymore. The only solution is to run an action in between the .csv files (dataset files) that closes and re-opens the PSD. The second part of the solution is to buy a 5TB external hard drive to store the temp files before the close and re-open happens.

Likes

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
LEGEND ,
Mar 19, 2022 Mar 19, 2022

Copy link to clipboard

Copied

LATEST

I wouldn't say it's up to Windows update, but the changed interaction of Photoshop with itself. For example in CS6 it was possible to paint on canvas smoothly when using non-accelerated Action mode, while in CC releases it let you seen the result, after each chunk of set time.

Likes

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