Sign in to follow this  
Followers 0
DCCD

Can't write to file!

5 posts in this topic

i need to Write "winxp command line" to file!! doesn't work for some reason?

FIND "Jones" FilePath\names.txt >Results.log

-if you replace $AttachFiles & with "C:/myfile.txt" ,Write Success!

$AttachFiles    = FileOpenDialog("file" , @MyDocumentsDir & "", "All (*.*)")
;
$find="FIND " & '"something" ' & $AttachFiles &" >Results.log"
MsgBox(0,"",$find&@CRLF&@CRLF& "Writes a value to a standard format .ini file!!")
;
$Return=IniWrite("myfile.ini", "section2", "key", $find)
MsgBox(0,"IniWrite - Return Value",$Return)

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

@WorkingDir is changed on successful return.

Your working dir got changed after the open dialog, so the ini gets created in that folder (where you browsed to). Save @workingdir and then restore it

Edited by Inverted

Share this post


Link to post
Share on other sites

i can't get it to work at all :)

$correct_working_dir = @WorkingDir
$AttachFiles    = FileOpenDialog("file" , @MyDocumentsDir & "", "All (*.*)")
FileChangeDir ($correct_working_dir)

$find="FIND " & '"something" ' & $AttachFiles &" >Results.log"
MsgBox(0,"",$find&@CRLF&@CRLF& "Writes a value to a standard format .ini file!!")

$Return=IniWrite("myfile.ini", "section2", "key", $find)
MsgBox(0,"IniWrite - Return Value",$Return)

Now ?

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