Sign in to follow this  
Followers 0
ant2ne

Why wont this work? runWait(@ComSpec...

8 posts in this topic

runWait(@ComSpec & "/c " & "DEL /Q /S /F " & @Desktopdir & "\*.mp3", @SW_Maximize)

Share this post


Link to post
Share on other sites



Look at the parameters.

RunWait(@ComSpec & " /c " & "Del " & '"' & @Desktopdir & '\*.mp3" /Q/S/F', "", @SW_MAXIMIZE )

Share this post


Link to post
Share on other sites

im guess you're trying to run cmd and send it commands? If so why not just open cmd then use send keys....


Dating a girl is just like writing software. Everything's going to work just fine in the testing lab (dating), but as soon as you have contract with a customer (marriage), then your program (life) is going to be facing new situations you never expected. You'll be forced to patch the code (admit you're wrong) and then the code (wife) will just end up all bloated and unmaintainable in the end.

Share this post


Link to post
Share on other sites

as a guess I bet it has something to do with the spaces in your @desktopdir as it is resolved... probably needs to be encapsulated in quotes for the extrapolated path to work.


[u]Helpful tips:[/u]If you want better answers to your questions, take the time to reproduce your issue in a small "stand alone" example script whenever possible. Also, make sure you tell us 1) what you tried, 2) what you expected to happen, and 3) what happened instead.[u]Useful links:[/u]BrettF's update to LxP's "How to AutoIt" pdfValuater's Autoit 1-2-3 Download page for the latest versions of Autoit and SciTE[quote]<glyph> For example - if you came in here asking "how do I use a jackhammer" we might ask "why do you need to use a jackhammer"<glyph> If the answer to the latter question is "to knock my grandmother's head off to let out the evil spirits that gave her cancer", then maybe the problem is actually unrelated to jackhammers[/quote]

Share this post


Link to post
Share on other sites

runWait(@ComSpec & "/c " & "DEL /Q /S /F " & @Desktopdir & "\*.mp3", @SW_Maximize)

Try this:

RunWait(@ComSpec & ' /C DEL /Q /S /F "' & @DesktopDir & '\*.mp3"', "", @SW_MAXIMIZE)

For me work fine. :)


When the words fail... music speaks

Share this post


Link to post
Share on other sites

Try this:

RunWait(@ComSpec & ' /C DEL /Q /S /F "' & @DesktopDir & '\*.mp3"', "", @SW_MAXIMIZE)

For me work fine. :)

THAT WORKS thanks!!! I figured it was a syntax problem. Now... to see if it will work with redirected folders.

Share this post


Link to post
Share on other sites

THAT WORKS thanks!!! I figured it was a syntax problem. Now... to see if it will work with redirected folders.

Mu ha ha !!

The students are going to hate me!

Share this post


Link to post
Share on other sites

#8 ·  Posted (edited)

Mu ha ha !!

The students are going to hate me!

Why? :) Edited by Andreik

When the words fail... music speaks

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  
Followers 0