Dir CMD not reading as it did


  1. Posts : 4
    Windows 7
       #1

    Dir CMD not reading as it did


    Hey there,
    Im having problems running a programically generated BAT file that used to work fine on the VISTA platform. The command I am running is:
    "Dir E:\VB Project\SearchForFiles /S/B | FindStr /L/I /C:"form" > D:\Search.Txt"
    (NB Below)

    This as I say worked fine under VISTA.
    Under WINDOWS 7 I get the following error:
    "The system cannot find the file specified.
    FINDSTR: // ignored"

    If I run the command: "Dir E: /S" I will get a complete listing for all files and directories as one would expect....including the directory VB Project
    If I run the command "Dir E:\VB Project /S" I get the error (After the system thinks about it): "File not found"

    I have attached a scren shot of the errors.

    I am at a loss as to why it behaves this way.

    Thanks

    NB The VB app generates the BAT file based on selected data from within a Miscrosoft Common Dialog control.
    Attached Thumbnails Attached Thumbnails Dir CMD not reading as it did-screenshot.jpg  
      My Computer


  2. Posts : 16,129
    7 X64
       #2

    Try using qoutes because of the spaces in the file name

    Dir E:\"VB Project"
      My Computers


  3. Posts : 4
    Windows 7
    Thread Starter
       #3

    SIW2 > It seems to have resolved the problem. Thank you.
      My Computer


  4. Posts : 16,129
    7 X64
       #4

    You're welcome:)
      My Computers


 

  Related Discussions
Our Sites
Site Links
About Us
Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 11:45.
Find Us