Sign in to follow this  
Followers 0
Seth27

Create a folder with the actual date

9 posts in this topic

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



Maybe with '_FileCreate()'?

Share this post


Link to post
Share on other sites

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

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

#5 ·  Posted (edited)

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

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

#7 ·  Posted (edited)

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

Thank you very much!!!!!!!!

Share this post


Link to post
Share on other sites

#9 ·  Posted (edited)

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  
Followers 0