Jump to content

Recommended Posts

Posted

$Date ="07072008"

DirCreate("C:\Desktop\" & $Date )

I want the program to create a folder according to the date either by user input or the system date, but a problem to be figured out later, right now I just gave the variable date a random date and I'm concatenating it just like I would with vba, I looked in the helpfile for DirCreate but it didn't have anything regarding this, does anyone know the correct syntax for this?

This is the code that I am using but it's not working, This program is going to be used in a company so usually the path is something like

C:\Documents and Settings\First.LastName\Desktop\

The First.LastName would be the username that an employee uses to log in the computer

Posted (edited)

To get the date do this:

@MONTH & @DAY & @YEAR;or maybe swtich month and day, I don't know what it's supposed to be

For the user Name:

@UserName

Those basically just work as variables you can use anytime in your script, for example:

Msgbox(0, @UserName, @MONTH & @DAY & @YEAR)

Thank you for the help , so let me run this by you I'm going to have

Update, when I ran

#include <GuiConstants.au3>

$Address = "C:\Documents and Settings\" & @UserName & "\Desktop\" & @MONTH

DirCreate($Address )

I got an error that said

C:\Documents and Settings\RobertR.Li\Desktop\random.au3(3,75) : ERROR: undefined macro.

$Address = "C:\Documents and Settings\" & @UserName & "\Desktop\" & @MONTH

Edited by ToyBoi

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
×
×
  • Create New...