Jump to content

Run("c:\sed-3.59.exe "s/find/rep/" c:\sedtest.txt > c:\neu.txt")


Dietmar
 Share

Recommended Posts

Hello now it`s the second time i have the same old problem (4me) :whistle:

Run("c:\sed-3.59.exe "s/find/rep/" c:\sedtest.txt > c:\neu.txt")

The command is between "...." but i need also "for the sed options" .

Can anybody leed a blind man, how can i handle this ? :">

Link to comment
Share on other sites

Run('c:\sed-3.59.exe "s/find/rep/" c:\sedtest.txt > c:\neu.txt')

Thx 4 fast reply but this was the first i have tried.

But the resalt is an empty file named like this: neu.txt'

I had the same trouble by creating a gui for dd. :whistle:

Isnt`t it possible to use " only as character

Link to comment
Share on other sites

StreamEDitor is an old Unix Tool also available 4 win an amazing fast ;)

RunWait(@ComSpec & " /c " & 'c:\sed-3.59.exe "s/01.11.2006/02.11.2006/g" c:\sedtest.txt > c:\neu.txt', "", @SW_HIDE)

works for me, i dont know why only run don`t work ?

Once i thougt it was allright but the script wasn`t able to to his job again.

I will open a *.csv and replace the Ref-date with the system date. And this without handeling any mouse moves etc.

This could include more then 10000 replaces. :P

And why sed, i don`t know any faster and it works good 4 me. :whistle:

Thx to all ans sry 4 my english ;)

Edited by Dietmar
Link to comment
Share on other sites

Run() will work fine... if you wait for it to finish... That is why RunWait() was created... You probably Run() it and try to access c:\neu.txt before anything is written... easy stuff really

Lar.

Ah RunWait wait till the CMD-BoX is open and send then the command and Run not ?

The box appears also by Run and Runwait (without hide :whistle:)

I thougt Runwait waits for Exit and pauses only the script till RunWait is ended

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