JS Test gets fileProperty("System.Message.DateSent") null

Post any Bulk Rename Utility support requirements here. Open to all registered users.

JS Test gets fileProperty("System.Message.DateSent") null

Postby chrisjj » Wed Jul 09, 2025 12:38 pm

In JS editor Test newName = fileProperty("System.Message.DateSent") returns null:

Image

perhaps because Test has forgotten to pick a file?

This is a real nuisance for testing.

Is this a known bug? Any fix on the way?

In main window, it returns the value expected:

Image
chrisjj
 
Posts: 44
Joined: Wed Mar 30, 2011 5:26 pm

Javascript "Test" button uses saved filepathname

Postby Luuk » Thu Jul 10, 2025 12:55 am

The "Test" button always uses the saved-filepath in "From", so he's probably just trying to test a filepath that no longer exists?
Maybe clicking the test-button should 1st verify the filepath, so then reporting an error?
Luuk
 
Posts: 818
Joined: Fri Feb 21, 2020 10:58 pm

Re: JS Test gets fileProperty("System.Message.DateSent") null

Postby Admin » Thu Jul 10, 2025 2:26 am

Hi. the From file path is the file or folder that is used for the JS test. You can select a file path for this with the browse button.
If the file does not exist or the file property is not present in that file, then the JS script conduct in the same way as it would if applied to a file that is no longer there or missing that property.
If you click OK and then select files in the list then you can see the script in action on "real" files.
Admin
Site Admin
 
Posts: 2972
Joined: Tue Mar 08, 2005 8:39 pm

Re: JS Test gets fileProperty("System.Message.DateSent") null

Postby chrisjj » Thu Jul 10, 2025 12:41 pm

Admin wrote:Hi. the From file path is the file or folder that is used for the JS test.


Ah! Sorry. I had no idea. I was fooled by the program's arbitrary automatic value for that field.

Admin wrote: You can select a file path for this with the browse button.
If the file does not exist or the file property is not present in that file, then the JS script conduct in the same way as it would if applied to a file that is no longer there or missing that property.
If you click OK and then select files in the list then you can see the script in action on "real" files.


That works great. Thanks. Perhaps add that to Help? Currently "Test" is completely undocumented AFAICT.
chrisjj
 
Posts: 44
Joined: Wed Mar 30, 2011 5:26 pm


Return to BRU Support