I have a whole bunch of batch scripts which have been running successfully for years on an XP pro machine.
After migrating to a much higher spec Windows 7 pro machine the scripts still run but only about half the files processed get saved when saving relatively small images (up to around 200x200 jpg.)
When saving larger sized processed images the saving process seems unaffected.
I suspect the problem is that small files get processed real fast and saving the changes is somehow running faster than the disk can keep up with and so some are being skipped. It has nothing to do with the number of files being processed either - whether I have 1000 or 2 files in a directory, only roughly half will get saved after processing.
Has anyone else had a similar problem and any suggestions how to fix?
I'm not keen on turning off the disk cache as it has other benefits and to be frank, I'm not why only PSP is affected, other batch file handling programs like (eg: Ken Rename) still work great.
Is there a 'pause' function that could introduce a few ms of delay after each file write event that could be added to the scripts to see if this works around the issue?
Script does not save when batch processing small images
Moderator: Kathy_9
-
winsburyUu4
- Posts: 2
- Joined: Sun Nov 29, 2015 1:20 pm
- System_Drive: C
- 32bit or 64bit: 64 Bit
-
LeviFiction
- Advisor
- Posts: 6831
- Joined: Thu Oct 02, 2008 1:07 pm
- System_Drive: C
- 32bit or 64bit: 64 Bit
- motherboard: Alienware M17xR4
- processor: Intel Core i7-3630QM CPU - 2_40GH
- ram: 6 GB
- Video Card: NVIDIA GeForce GTX 660M
- sound_card: Sound Blaster Recon3Di
- Hard_Drive_Capacity: 500GB
- Corel programs: PSP: 8-2023
- Location: USA
Re: Script does not save when batch processing small images
All scripts are written in Python. So if you want to know if a function exists in python you can always do a search.
What version of PSP are you using? Since you mentioned a scratch disk I can assume X4 or X5 minimum?
If you want to try pausing. At the top of your script just below the "from PSPApp import * " line add "import time"
Then just before any command that you want to wait on, use time.sleep(). This command takes a value in seconds. And Windows can only support sleeping for 10-13 milliseconds. So .013 is the smallest value you can put in there. Might as well put it at either half a second or a full second, depending on the number of images
What version of PSP are you using? Since you mentioned a scratch disk I can assume X4 or X5 minimum?
If you want to try pausing. At the top of your script just below the "from PSPApp import * " line add "import time"
Code: Select all
from PSPApp import *
import time
Code: Select all
time.sleep(0.5)
https://levifiction.wordpress.com/
-
winsburyUu4
- Posts: 2
- Joined: Sun Nov 29, 2015 1:20 pm
- System_Drive: C
- 32bit or 64bit: 64 Bit
Re: Script does not save when batch processing small images
Thanks , yes that seems to do as a workaround but I'm still hoping someone might have a more 'scientific' solution as to why Windows 7 64 pro throws up this anomaly and how to fix properly.
Adding 0.5 second to each file might not seem a lot but I process hundreds, often thousands of files per day and this adds up to a lot of lost productivity especially having to double check every file actually processed okay is together costing many hours.
Version is X2 ( yes, its old, but usually stable for what we do and supposedly compatible with W7pro.)
Adding 0.5 second to each file might not seem a lot but I process hundreds, often thousands of files per day and this adds up to a lot of lost productivity especially having to double check every file actually processed okay is together costing many hours.
Version is X2 ( yes, its old, but usually stable for what we do and supposedly compatible with W7pro.)
-
JoeB
- Posts: 2778
- Joined: Fri Mar 28, 2008 10:04 pm
- System_Drive: C
- 32bit or 64bit: 64 Bit
- motherboard: LENOVO 4524PE4 ThinkCentre M91p
- processor: 3.10 gigahertz Intel Quad Core i5-2400
- ram: 8 GB
- Hard_Drive_Capacity: 4.6 TB
- Corel programs: PSP 9, X7 to 2019, 32 & 64-bit
- Location: Canada
Re: Script does not save when batch processing small images
5000 files at an additional .5 seconds/file should only add less than 45 minutes over the course of a day. If some testing shows that this workaround actually works then you should be able to complete your projects without having to double check. Just a thought.winsburyUu4 wrote: Adding 0.5 second to each file might not seem a lot but I process hundreds, often thousands of files per day and this adds up to a lot of lost productivity especially having to double check every file actually processed okay is together costing many hours.
Regards,
JoeB
Using PSP 2019 64bit
JoeB
Using PSP 2019 64bit
