Jump to content

Folder Help


Recommended Posts

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

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

  • Moderators

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

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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...