Sign in to follow this  
Followers 0
tlokz

Folder Help

7 posts in this topic

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) & "\"

Share this post


Link to post
Share on other sites



Help?

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

Doesn't work!

Local $pathing = @ScriptDir & "\Archived_Logs\" & _DateTimeFormat(_NowCalc(), 2) & "\" & _DateTimeFormat(_NowCalc(), 3) & "\"
    DirCreate($pathing)

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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!

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