AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

FileCreateDir with variables

 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Bug Reports
View previous topic :: View next topic  
Author Message
beardboy



Joined: 02 Mar 2004
Posts: 444
Location: SLC, Utah

PostPosted: Thu May 27, 2004 6:31 pm    Post subject: FileCreateDir with variables Reply with quote

Code:
FileCreateDir, c:\%a_year%%a_mon%%a_mday%
MsgBox, Errorlevel = %errorlevel%

This always returns Errorlevel = 1. I also tried saving the date to a variable and just using that variable and that did not work either.

Code:
FileCopy, Temp.exe, c:\newfolder\Temp.exe, 1
MsgBox, Errorlevel = %errorlevel%

This probably belongs in the Wish List, but if the folder newfolder does not exist it will not create it. If the Overwrite Flag is there could this be an option to create the directory as well?

thanks,
beardboy
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger MSN Messenger
beardboy



Joined: 02 Mar 2004
Posts: 444
Location: SLC, Utah

PostPosted: Thu May 27, 2004 6:38 pm    Post subject: Reply with quote

I can always use DOS to do this:
Code:
RunWait, %comspec% /c md c:\%a_year%%a_mon%%a_mday%

But I prefer to use AutoHotkey functions when I can.

thanks,
beardboy
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger MSN Messenger
Chris
Site Admin


Joined: 02 Mar 2004
Posts: 10467

PostPosted: Thu May 27, 2004 8:14 pm    Post subject: Reply with quote

Quote:
FileCreateDir, c:\%a_year%%a_mon%%a_mday%
MsgBox, Errorlevel = %errorlevel%

That example works on my system. Perhaps the directory already exists, there is a file of that same name, or the user lacks the permission to create a directory there?

Quote:
.. but if the folder newfolder does not exist it will not create it. If the Overwrite Flag is there could this be an option to create the directory as well?

That sounds like a good option, I'll put it on the infamous to-do list.
Back to top
View user's profile Send private message Send e-mail
beardboy



Joined: 02 Mar 2004
Posts: 444
Location: SLC, Utah

PostPosted: Thu May 27, 2004 8:55 pm    Post subject: Reply with quote

Quote:
That example works on my system. Perhaps the directory already exists, there is a file of that same name, or the user lacks the permission to create a directory there?

Oops, with my FileCopy testing I had created a file with that name by accident, and it was sitting at the bottom of my explorer window. Thanks for pointing out my mistake. Embarassed

thanks,
beardboy
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger MSN Messenger
Chris
Site Admin


Joined: 02 Mar 2004
Posts: 10467

PostPosted: Thu May 27, 2004 9:55 pm    Post subject: Reply with quote

Thanks for rechecking it.

Never feel sorry for misreporting a bug. Even if you turn out to be wrong, so many people stay silent when they see something weird that some bugs go unfixed for a long time.
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Bug Reports All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group