Miscellaneous - Questions
Re: Miscellaneous - Questions
Answering the question would have been better...
No $parent...^^
Code: Select all
renameitem(gpc(<curpath>, "file") . <clipboard>, <curpath>);
One of my scripts helped you out? Please donate via Paypal
Re: Miscellaneous - Questions
You ^^. Now I can
I just need to mention, I started off to use ahk after 3 days @jupe mentioned about that. And today 254 lines of code.
But I didn't wrote down single line code in XY by myself. That is terrible, huge consuming of time but even no single line of code.
Unfortunately, I absolutely don't understand XY scripting until today.
Thanks a lot, ^^
I just need to mention, I started off to use ahk after 3 days @jupe mentioned about that. And today 254 lines of code.
But I didn't wrote down single line code in XY by myself. That is terrible, huge consuming of time but even no single line of code.
Unfortunately, I absolutely don't understand XY scripting until today.
Thanks a lot, ^^
Re: Miscellaneous - Questions
XY is (like AHK) a scripting language. Don't see any difference there.
It just makes no sense to try to rename the parent of the current path when you actually want to rename the current path.
Programming is about logic. The rest is help file reading and statement construction. AHK is in no way easier than XY (and
I know what I'm talking about, I'm using AHK for years as well)...
It just makes no sense to try to rename the parent of the current path when you actually want to rename the current path.
Programming is about logic. The rest is help file reading and statement construction. AHK is in no way easier than XY (and
I know what I'm talking about, I'm using AHK for years as well)...
One of my scripts helped you out? Please donate via Paypal
Re: Miscellaneous - Questions
This is time I spent for my currently issue, and I spent my time in the help.pdf and tried study your script (before you helped me) because it is similar issue.
(mini - is meaning tree)
I hope I will write down next script by myself. (I will celebrate it, IF I will do it)
Thanks a lot, sir. Highly appreciate that.
(mini - is meaning tree)
I hope I will write down next script by myself. (I will celebrate it, IF I will do it)
Thanks a lot, sir. Highly appreciate that.
Re: Miscellaneous - Questions
#4 Creating Incremental Folders
My goal to Create 10 Folders.
Selected Folder name: `Prefix-120-`
Need to Created Folders will look like this:
I just give it a try to achieve my goal.
I am just laughing my scripting knowledge.
But still trying...
My goal to Create 10 Folders.
Selected Folder name: `Prefix-120-`
Need to Created Folders will look like this:
- —
01. Prefix-121-
02. Prefix-122-
03. Prefix-123-
...
10. Prefix-130-
I just give it a try to achieve my goal.
Code: Select all
$dstPath = <curpath>;
$subFolders = "Folder-121-|Folder-122-"; ' No idea for incremental folder names
$folderName = gpc(<curitem>, "component", -2, 1);
if ($folderName)
{
foreach($subFolder, $subFolders, , "e")
{
new("$dstPath\$folderName\$subFolder", "dir");
}
}
But still trying...
Re: Miscellaneous - Questions
Mh?
Give a real world example, so that I can see what the real prefix is and if there comes anything after
Prefix-<number>-
Give a real world example, so that I can see what the real prefix is and if there comes anything after
Prefix-<number>-
One of my scripts helped you out? Please donate via Paypal
Re: Miscellaneous - Questions
Something like below. And only words no `Symbols, `Numbers in this case.
Prefix is:
Prefix is:
- Sport
Medical
Health
Do Fitness
Re: Miscellaneous - Questions
What does such a folder name now has to do with what you requested before?
Can you be a bit more damn specific? oO
Can you be a bit more damn specific? oO
One of my scripts helped you out? Please donate via Paypal
Re: Miscellaneous - Questions
Sorry. I don't understand your 1st question.
Currently real Folder Name is in my Drive: Medical-012-
So my goal to write a script to create 10 folders.
Medical-013-
Medical-014-
Medical-015-
Medical-016-
Medical-017-
Medical-018-
Medical-019-
Medical-020-
Medical-021-
Medical-022-
Currently real Folder Name is in my Drive: Medical-012-
So my goal to write a script to create 10 folders.
Medical-013-
Medical-014-
Medical-015-
Medical-016-
Medical-017-
Medical-018-
Medical-019-
Medical-020-
Medical-021-
Medical-022-
Re: Miscellaneous - Questions
Code: Select all
$howMany = 10;
$base = gpc(<curitem>, "file");
$startNum = trim(regexmatches($base, "-\d+?-"), "-");
while ($i++ < $howMany) {
$inc = "-" . ($startNum + $i) . "-";
$newName = regexreplace($base, "-\d+?-", $inc);
new($newName, "dir");
}
One of my scripts helped you out? Please donate via Paypal
Re: Miscellaneous - Questions
Thanks a lot man.
Just needed to do by myself, but I only found this `<#001> don't know how to combine it with this script to achieve my goal.
So problem is missing `0/zero as you see in the screenshot.
Is there a chance to do it like this? `013, 014, ..., 022
Just needed to do by myself, but I only found this `<#001> don't know how to combine it with this script to achieve my goal.
So problem is missing `0/zero as you see in the screenshot.
Is there a chance to do it like this? `013, 014, ..., 022
Re: Miscellaneous - Questions
Look up the format() command to get such a padding
One of my scripts helped you out? Please donate via Paypal
Re: Miscellaneous - Questions
Wow, it worked. Thanks.
Is this method right?
Code: Select all
$inc = "-0" . ($startNum + $i) . "-";
Re: Miscellaneous - Questions
No, it isn't. I said "look up the format() command"...
One of my scripts helped you out? Please donate via Paypal