Finally after an hour of research I came up with a very simple solution. I didn't know it would be so hard to do. Maybe more experienced minds have a simpler answer
<?xml version="1.0"?>
<button backcol="none" display="both" label_pos="right" separate="yes" textcol="none">
<label>Create Tomorrow Folder</label>
<icon1>#makedir</icon1>
<function type="script">
<instruction>@script VBScript</instruction>
<instruction>Option Explicit</instruction>
<instruction>Function OnClick(ByRef clickData)</instruction>
<instruction> Dim d</instruction>
<instruction> d = WeekDayName(WeekDay(now+1),True)</instruction>
<instruction> clickData.func.command.RunCommand("CreateFolder NAME=""" & date + 1 & " " & d & """")</instruction>
<instruction>End Function</instruction>
</function>
</button>
This will create a folder with tomorrow's date in the current lister, example 2017-09-29 Fri
What is your regional settings? Is it set to the US?
Oh I figured it out now! If you add Dopus.Output(date+1) I'm sure you'll see 2017/10/05 , so the slashes are getting converted into subfolders, you need to change the formats on your system or manually change the slashes to dashes.
You can try to add this code replace(date+1,"\","-") or replace(date+1,"/","-") instead of date+1. I haven't tested it, try to experiment with it.
The script above outputs appends the date to the command string without specifying a format.
With VBScript, that probably means it will use the system date format. If there are / characters in that format, then they'll be in the command line the script generates, and the script will create sub-directories.
This thread has an example of how to get tomorrow's date and format it in a specific way from a script. It's a Rename script, using JScript instead of VBScript, but the general idea is the same:
function OnClick(clickData)
{
var d = new Date(); // Today
d.setDate(d.getDate() + 1); // Move date part to tomorrow.
var dd = d.getDate();
var mm = d.getMonth() + 1; // Jan=0,Feb=1,etc.
var yyyy = d.getFullYear();
var day = ["Sun","Mon","Tue","Wed","Thu","Fri","Sat"][ d.getDay() ];
if (dd < 10) dd = "0" + dd; // Pad to 2 digits
if (mm < 10) mm = "0" + mm; // Pad to 2 digits
var ds = yyyy + "-" + mm + "-" + dd + " " + day;
clickData.func.command.RunCommand("CreateFolder READAUTO=no NAME=\"" + ds + "\"");
}
Edit: Here's a nicer way of doing the same thing:
function OnClick(clickData)
{
var d = DOpus.Create.Date();
d.Add(1,"d");
var ds = d.Format("D#YYYY-MM-dd ddd");
clickData.func.command.RunCommand("CreateFolder READAUTO=no NAME=\"" + ds + "\"");
}