I understand it may appear to be a bizarre request, but is there a script or some type of method to rename a folder that simply adds the number of subfiles its name? Example:
Music Folder / Files needed to Sort
rename the last folder to
Music Folder / Files needed to Sort (# of subfiles)
Any help or guidance would be appreciated. Thank you community!
Dudes, thank you to both of you for your replies and assisting with my randomness.
But YOU, Mr. lxp, deserve a Distinguished Service Cross, or some other shiny metal object to denote absolutely fantastic service to this board, and showing poise and bravery in the line of bizarre questions and requests by others and myself.
Thank you so much for the updated script. Sometime ago you suggested to me that learning to write scripts would be beneficial. I am working on it. Thanks.
True, but that way you would have to have the script on one side and a button on the other side, for me it would very helpful to have it all together in a single button...
function OnClick(clickData)
{
var fso = new ActiveXObject('Scripting.FileSystemObject');
function OnGetNewName(getNewNameData) {
if (!getNewNameData.item.is_dir) return;
return getNewNameData.newname + ' (' + fso.GetFolder(getNewNameData.item).Files.count + ')';
}
}
Man you exceeded my expectations for what I asked for by so much and I appreciate your expertise immensely! Thank you so much for contributing I can't tell you how much I rely on the kindness and Goodwill of everyone on this board so I really do appreciate your hard work
Is that a complete button code? I have tried this code in a button set the function of the button in scripting but it's doesn't work in my test. what's the wrong? Is that possible to count only .flac within the folder? Thanks
No @khalidhosain, that code that I posted doesn't work, it was am attempt by me to want to adapt the original lpx code to a button, but I didn't get it, sorry
Set the button function in Standard Function (Opus or external)
then add this code before lxp's code
@nodeselect
Rename TO "*"
@script Jscript
Enjoy!!
But here comes my Problem. I want to count Only the Music files I mean want to use If File extension is (.flac|.mp3|.m4a|.wav)
Please some one help with some line of code. Thanks in advance.
Will it be very difficult to make the script also count the folders, that is, files + folders, as it is, in a non-recursive way? Thank you very much, and sorry for bothering