ToyBoi Posted August 1, 2008 Share Posted August 1, 2008 $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 Link to comment Share on other sites More sharing options...
Achilles Posted August 1, 2008 Share Posted August 1, 2008 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) My Programs[list][*]Knight Media Player[*]Multiple Desktops[*]Daily Comics[*]Journal[/list] Link to comment Share on other sites More sharing options...
ToyBoi Posted August 1, 2008 Author Share Posted August 1, 2008 (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 August 1, 2008 by ToyBoi Link to comment Share on other sites More sharing options...
youknowwho4eva Posted August 1, 2008 Share Posted August 1, 2008 use @mon not @month Giggity Link to comment Share on other sites More sharing options...
ToyBoi Posted August 1, 2008 Author Share Posted August 1, 2008 use @mon not @monthThanks! Link to comment Share on other sites More sharing options...
baghenamoth Posted August 1, 2008 Share Posted August 1, 2008 or you can use this : #Include <Date.au3> DirCreate(@DesktopDir & "\" & StringReplace(_NowCalcDate(),"/","")) Link to comment Share on other sites More sharing options...
Achilles Posted August 2, 2008 Share Posted August 2, 2008 use @mon not @monthOops, sorry about that... should of checked it before I posted. My Programs[list][*]Knight Media Player[*]Multiple Desktops[*]Daily Comics[*]Journal[/list] Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now