tlokz Posted July 12, 2008 Share Posted July 12, 2008 When creating a folder you can't have any spaces. Is there any work around? This is my line: Local $pathing = @ScriptDir & "\Archived_Logs\" & @MDAY & "-" & @MON & "-" & @YEAR & "\" & @HOUR & "-" & @MIN & "-" & @SEC & "\" This is what I want it to be: Local $pathing = @ScriptDir & "\Archived_Logs\" & _DateTimeFormat( _NowCalc(), 2) & "\" & _DateTimeFormat( _NowCalc(), 3) & "\" Link to comment Share on other sites More sharing options...
tlokz Posted July 12, 2008 Author Share Posted July 12, 2008 Help? Link to comment Share on other sites More sharing options...
GoogleDude Posted July 12, 2008 Share Posted July 12, 2008 Not sure what you mean! the below code does (for me) create a folder name with spaces. DirCreate("C:\Intel Inside") Just my .02 cents GoogleDude Link to comment Share on other sites More sharing options...
tlokz Posted July 12, 2008 Author Share Posted July 12, 2008 Doesn't work! Local $pathing = @ScriptDir & "\Archived_Logs\" & _DateTimeFormat(_NowCalc(), 2) & "\" & _DateTimeFormat(_NowCalc(), 3) & "\" DirCreate($pathing) Link to comment Share on other sites More sharing options...
Andreik Posted July 12, 2008 Share Posted July 12, 2008 Local $pathing = @ScriptDir & "\Archived_Logs\" & _DateTimeFormat(_NowCalc(), 2) & "\" & StringReplace(_DateTimeFormat(_NowCalc(), 3),":",".") & "\" DirCreate($pathing) Char ":" is not valid for folder name. When the words fail... music speaks. Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted July 12, 2008 Moderators Share Posted July 12, 2008 Doesn't work! Local $pathing = @ScriptDir & "\Archived_Logs\" & _DateTimeFormat(_NowCalc(), 2) & "\" & _DateTimeFormat(_NowCalc(), 3) & "\" DirCreate($pathing)http://support.microsoft.com/kb/177506 #include <Date.au3> ConsoleWrite(@ScriptDir & "\Archived_Logs\" & _DateTimeFormat(_NowCalc(), 2) & "\" & _DateTimeFormat(_NowCalc(), 3) & "\" & @CRLF)See an issue? May look at StringReplace(). Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
tlokz Posted July 12, 2008 Author Share Posted July 12, 2008 Thank you very much was wondering why... And just realized I'm a retard. Thanks guys and thanks for the tip string replace SmOke_N! 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