Jump to content

UNC path question..


KXM
 Share

Recommended Posts

Should this line of code work?

$sBug = 'Test'

_FileWriteLog('\\server\data\yagsi\Bin\BUG.log', $sBug)

Or does AutoIt not support this?

<{POST_SNAPBACK}>

i'd say do it like this...

$file = FileOpen("\\server\data\yagsi\bin\bug.log",1)
$sBug = "test"
FileWriteLine($file, $sBug)
FileClose($file)
Link to comment
Share on other sites

i'd say do it like this...

$file = FileOpen("\\server\data\yagsi\bin\bug.log",1)
$sBug = "test"
FileWriteLine($file, $sBug)
FileClose($file)

<{POST_SNAPBACK}>

I saw this the other day also and decided not to mention it

http://www.autoitscript.com/forum/index.php?showtopic=13881#

but especially for this thread.. the _FileWriteLog, which i use quite often, also places the date and time in the line of text added, per help

_FileWriteLog

--------------------------------------------------------------------------------

Writes current date,time and the specified text to a log file.

this is very helpful and may replace the need for

@MON & @MDAY & @YEAR

Additionally, there is no need for file open or file close

Maybe you weren't aware of this feature when you suggested the above post to KXM

anyways, I see you've been busy here helping others... and thats great

Enjoy!

Robert M

8)

Edited by Valuater

NEWHeader1.png

Link to comment
Share on other sites

  • 2 weeks later...

I saw this the other day also and decided not to mention it

http://www.autoitscript.com/forum/index.php?showtopic=13881#

but especially for this thread.. the _FileWriteLog, which i use quite often, also places the date and time in the line of text added, per help

this is very helpful and may replace the need for

@MON & @MDAY & @YEAR

Additionally, there is no need for file open or file close

Maybe you weren't aware of this feature when you suggested the above post to KXM

anyways, I see you've been busy here helping others... and thats great

Enjoy!

Robert M

8)

<{POST_SNAPBACK}>

Thanks for the info, you're right i wasn't particularly familiar with the _FileWriteLog, most of my scripts are for doing things right now, and i need to know about success or failure each step of the way at runtime. So i don't typically have any need to write a log file. definitely a cool function to know about incase i ever do though.
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...