Jump to content

Can't write to file!


Recommended Posts

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)
Link to comment
Share on other sites

@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
Link to comment
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 ?

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...