Jump to content
Sign in to follow this  
gcue

directory confusion

Recommended Posts

gcue

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

Share this post


Link to post
Share on other sites
gcue

i tried:

RunWait(@ComSpec & @ScriptDir & "\pslist.exe " & "\\" & $asset & " > " & $file)

but that didnt work either.

Share this post


Link to post
Share on other sites
Jos

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 Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites
gcue

hmm im getting a blank list of processes - a file however ISS getting created in my temp dir.. wohoo!

Share this post


Link to post
Share on other sites
gcue

figured it out!

i needed to take some of the quotes out

many many thanks!

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  

×