Jump to content
Sign in to follow this  
KXM

UNC path question..

Recommended Posts

KXM

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
seandisanti

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)

Share this post


Link to post
Share on other sites
KXM

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
Valuater

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
seandisanti

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.

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  

×