Jump to content
Sign in to follow this  
Seth27

Create a folder with the actual date

Recommended Posts

Seth27

Hi,

I want to create a file with the actual date.

I thought I could realize this in that way:

$TodaysDateIs = (@YEAR & "/" & @MON & "/" & @MDAY)
DirCreate ("C:\test\"& $TodaysDateIs)

But this only creates the directory C:\test\.

How can I add the date?

Finally I want to have the directory for example:

C:\test\18.07.2006

That you!!!!

Share this post


Link to post
Share on other sites
MHz

C:\test\18.07.2006

You answered your problem with a correct method. Use chars that are valid for folder\filenames.

Share this post


Link to post
Share on other sites
Seth27

How can I use chars? And what are chars?

Have you an idea, how such a command can look like?

I am new here and I don't know very much about the code of autoit.

Sorry!

Share this post


Link to post
Share on other sites
Briegel

He means the "/" chars.

EDIT: You have to decide what you want. Create a folder or a file. Both functions are in this thread.

Edited by Briegel

Share this post


Link to post
Share on other sites
Seth27

I only want to create a folder with the actual date

For Briegel:

Ich will nur einen Ordner erstellen mit dem akutellen Datum. Das soll so sein, dass es ein Stammverzeichnis gibt, sowas wie C:\posteingang .

Am 28.10.2030 scanne ich ein Dokument ein, was nach dem Scan in dem Ordner C:\blubber liegt.

Um 23:30 Uhr sollen alle Dokumente in den Ordner C:\posteingang\"aktuelles Datum" verschoben werden.

Vielleicht ist diese Beschreibung verständlicher, mein Englisch ist nicht das Beste!

Grüße

Share this post


Link to post
Share on other sites
Helge

Scheisse. You can't use "/" in your folder name. This works :

$TodaysDateIs = (@YEAR & "-" & @MON & "-" & @MDAY)
DirCreate ("C:\test\"& $TodaysDateIs)
Edited by Helge

Share this post


Link to post
Share on other sites
MHz

How can I use chars? And what are chars?

Char is a typical shortened name for Character

Several characters are not available for use with Windows filenames or folder names. Not sure of the list is documented where, but is something like %^*+=<> as a wild guess.

Edited by MHz

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.