Sl4yer Posted September 3, 2008 Share Posted September 3, 2008 hi script folks, how am i suppose to write the folloing in the correct way??? RunWait(@ComSpec & " /c " & "dir /b /s " & GUICtrlRead($vinput) & ">c:\vzsucheErg.txt") pls help Link to comment Share on other sites More sharing options...
Danny35d Posted September 3, 2008 Share Posted September 3, 2008 Take a look at the combination of single quote (') and double quote ("). RunWait(@ComSpec & ' /c dir /b /s "' & GUICtrlRead($vinput) & '" > c:\vzsucheErg.txt') AutoIt Scripts:NetPrinter - Network Printer UtilityRobocopyGUI - GUI interface for M$ robocopy command line Link to comment Share on other sites More sharing options...
Sl4yer Posted September 3, 2008 Author Share Posted September 3, 2008 Take a look at the combination of single quote (') and double quote ("). RunWait(@ComSpec & ' /c dir /b /s "' & GUICtrlRead($vinput) & '" > c:\vzsucheErg.txt') hmm.. kk i got the thing with the single quotes.. but theres another point that bothers me: what exactly does the parameter /c in combination with the @ComSpec commando do??? RunWait(@ComSpec & ' /c i expected something like this: but that's not what the parameter is about... pls help Link to comment Share on other sites More sharing options...
ksmith247 Posted September 3, 2008 Share Posted September 3, 2008 do cmd /? and you will see: c:\>cmd /? Starts a new instance of the Windows command interpreter CMD [/A | /U] [/Q] [/D] [/E:ON | /E:OFF] [/F:ON | /F:OFF] [/V:ON | /V:OFF] [[/S] [/C | /K] string] /C Carries out the command specified by string and then terminates /K Carries out the command specified by string but remains /S Modifies the treatment of string after /C or /K (see below) /Q Turns echo off /D Disable execution of AutoRun commands from registry (see below) /A Causes the output of internal commands to a pipe or file to be ANSI /U Causes the output of internal commands to a pipe or file to be Unicode /T:fg Sets the foreground/background colors (see COLOR /? for more info) /E:ON Enable command extensions (see below) /E:OFF Disable command extensions (see below) /F:ON Enable file and directory name completion characters (see below) /F:OFF Disable file and directory name completion characters (see below) /V:ON Enable delayed environment variable expansion using ! as the delimiter. For example, /V:ON would allow !var! to expand the variable var at execution time. The var syntax expands variables at input time, which is quite a different thing when inside of a FOR loop. /c will perform what you tell it to then the process goes away. Support bacteria; it's the only culture most people have.LxP's Learning to Script with AutoIt 3 - Excellent starting placeVolly's Links Page - Links to cool and useful scriptsAutoIt Wrappers - Valuater's AutoIt Wrappers post. Lots of good stuff.Support AutoIt - Make a donation here; I did.[size="2"]#include <Guinness.pint>[/size] Link to comment Share on other sites More sharing options...
PsaltyDS Posted September 3, 2008 Share Posted September 3, 2008 It is quite useful when debugging that kind of script to temporarily change "/c" to "/k", which causes the "DOS Box" to stay open for you to see any resulting error messages, etc. Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now