Jump to content
Sign in to follow this  
DCCD

Can't write to file!

Recommended Posts

DCCD

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
Inverted

@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
Inverted

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  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.