You are not logged in.
Could we know if the name of the function going to be changed or not?
I want to update some old scripts but I'd prefer to wait than do it twice.
If this software has helped you, consider getting your pro version. :)
Offline
I'm not sure about it. Is there any benefit in knowing how many files are there including the unmarked ones?
Unmarked files are excluded from renaming and previewing, so they should be irrelevant. Also, if Index is based on the total marked+unmarked files, then index between consecutive files in preview can jump by more than 1 and it is less intuitive I think.
Offline
Hi Denis, our point was just the naming of that commando.
Since "GetTotalNumberOfFiles" give us the amount of the marked files,
we have suggested to name that command "GetNumberOfSelectedFiles" instead.
Or "GetNumberOfMarkedFiles". Just to make it more clear.
Because "GetTotalNumberOfFiles" implies to me Get Total Number Of Files from folder.
A file is marked by putting a tick in its check box.
Conversely, it is unmarked by removing the tick.
ReNamer acts only on the marked files. An unmarked file is neither previewed nor renamed.
ReNamer:Adding_files_and_folders#Marking_and_Unmarking_the_files
- - -
Is there any benefit in knowing how many files are there including the unmarked ones?
Could be. But at the moment i have no use for an command like "GetNumberOfFilesInList".
I think we just were not clear in our words.
But i would have an use if the old name "GetTotalNumberOfFiles"
would be reused for an new command to give me what "TotalFilesOnFolder" in this code does:
WideScanDirForFiles(WideExtractFilePath(FilePath), FilesArray, false, false, false, '*');
TotalFilesOnFolder := IntToStr(length(FilesArray));
Read the *WIKI* for HELP + MANUAL + Tips&Tricks.
If ReNamer had helped you, please *DONATE* to Denis or buy a PRO license. (Read *Lite vs Pro*)
Offline
What about GetFileIndexLength?, it would then match to it's pair GetCurrentFileIndex
If this software has helped you, consider getting your pro version. :)
Offline
Thinking a little on my suggestion it might not be very clear. Being the FileIndex a number, and trying to use it with the meaning of a list may not be a good idea...
I think Stefan's GetNumberOfMarkedFiles is the best one until now.
If this software has helped you, consider getting your pro version. :)
Offline
I think you guys are right. How about the following names?
GetCurrentFileIndex and GetCurrentMarkedFileIndex
GetTotalNumberOfFiles and GetTotalNumberOfMarkedFiles
This will provide clearer names and also both of functions (marked and total).
Offline
I tend to do this often - asking question and then implementing it anyway without waiting for a response. It's probably because I got time now so I can simply implement it instead of waiting for another week or two before I get a chance to do this
These functions are added in v5.60.25 Beta.
Wiki has been updated: ReNamer:Pascal_Script:Functions#Application
Offline