Windows Cmd Prompt How to make two actions happen

Posted on 2009-02-11
Last Modified: 2012-05-06
IM and trying to write a simple syntax via windows cmd prompt to perform two actions....

C:\Program Files\Microsoft Office\Office>FOR /R \\\ec_dev_sdaviationedrb\DOC_Files\50000 %G IN (*.doc) DO set filePath=%G and excel.exe /r Test_AutoRun4.xls

The for-loop works great, the syntax is perfect except I want to DO two things.  I don't know how to make the command window see two commands after the DO.  "and" did not work for me.

Please Help... Thanks

Question by:plusone3055
    1 Comment
    LVL 19

    Accepted Solution


    Featured Post

    What Is Threat Intelligence?

    Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

    Join & Write a Comment

    After several hours of googling I could not gather any information on this topic. There are several ways of controlling the USB port connected to any storage device. The best example of that is by changing the registry value of "HKEY_LOCAL_MACHINE\S…
    This very simple solution applies to a narrow cross-section of the "needs to close" variety. In this case, the full message in Event Viewer was in applog, Event ID 1000: Faulting application iexplore.exe, version 8.0.6001.18702, faulting module …
    The viewer will learn how to use the =DISCRINV command to create a discrete random variable, use this command to model a set of probabilities and outcomes in a Monte Carlo simulation, and learn how to find the standard deviation of a set of probabil…
    The viewer will learn how to use a discrete random variable to simulate the return on an investment over a period of years, create a Monte Carlo simulation using the discrete random variable, and create a graph to represent the possible returns over…

    745 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    15 Experts available now in Live!

    Get 1:1 Help Now