#1 2017-03-17 12:52

azarubkin
Member
Registered: 2017-03-17
Posts: 2

Storing original file name

What is the correct way to get the original file name, before rules execution? Is it WideExtractFileName(FilePath)?

My problem is: I'd like to check if the target file name exists and is newer than the one being renamed, and if so, cancel the rename (by assigning original file name to FileName variable).
The current setup is:
1. Remove certain substring from file name.
2. Execute script which checks dates and optionally cancels the renaming.

Is it OK?

Last edited by azarubkin (2017-03-17 12:57)

Offline

#2 2017-03-17 15:06

den4b
Administrator
From: den4b.com
Registered: 2006-04-06
Posts: 3,367

Re: Storing original file name

What is the correct way to get the original file name, before rules execution? Is it WideExtractFileName(FilePath)?

That is correct.

The current setup is:
1. Remove certain substring from file name.
2. Execute script which checks dates and optionally cancels the renaming.
Is it OK?

Yes, that is absolutely fine.

Have you experienced any issues?

Offline

#3 2017-03-20 10:06

azarubkin
Member
Registered: 2017-03-17
Posts: 2

Re: Storing original file name

No, just wanted to make sure I'm doing everything right :-)

Offline

Board footer

Powered by FluxBB