Jump to content

directory confusion


gcue
 Share

Recommended Posts

i am having trouble using a dos program and piping to a directory

here's what i got (pslist- lists active processes on a remote machine)

$file = (@TempDir & "\pslist.txt")
RunWait(@ScriptDir & "\pslist.exe " & "\\" & $asset & " > " & $file)

here's the syntax which works without using autoit:

pslist.exe \\assetnumber > c:\temp\pslist.txt

i cant find the file *sigh*

i've checked the remote machine's temp dir, my temp dir, and the scriptdir and i dont see where pslist.txt went

*sigh*

Edited by gcue
Link to comment
Share on other sites

  • Developers

You need to use @Comspec to be able to use the pipe characters.

Jos

Edited by Jos

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

  • Developers

Try something like this:

RunWait(@ComSpec & ' /c "' & @ScriptDir & '\pslist.exe" "\\' & $asset & '" > ' & FileGetShortName($file))
Edited by Jos

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

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