Sign in to follow this  
Followers 0
KXM

UNC path question..

5 posts in this topic

Should this line of code work?

$sBug = 'Test'

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

Or does AutoIt not support this?

Share this post


Link to post
Share on other sites



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)

1100111 00001011101111 00011101101111 00010111100100 00001111110100 00110111110010 00101101111001 0011100i didn't make up this form of encryption, but i like it.credit to the lvl 6 challenge on arcanum.co.nz

Share this post


Link to post
Share on other sites

Thanks for the fast reply... As it turns out, I forgot to set write permissions.

That being said, _FileWriteLog will work correctly with UNC.

THNX!

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

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

Share this post


Link to post
Share on other sites

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.

1100111 00001011101111 00011101101111 00010111100100 00001111110100 00110111110010 00101101111001 0011100i didn't make up this form of encryption, but i like it.credit to the lvl 6 challenge on arcanum.co.nz

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