Windows 7 Forums


Windows 7: Dir CMD not reading as it did

23 Apr 2011   #1

Windows 7
 
 
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
Dir CMD not reading as it did-screenshot.jpg  
My System SpecsSystem Spec

23 Apr 2011   #2

Vista x64 / 7 X64
 
 

Try using qoutes because of the spaces in the file name

Dir E:\"VB Project"
My System SpecsSystem Spec
23 Apr 2011   #3

Windows 7
 
 

SIW2 > It seems to have resolved the problem. Thank you.
My System SpecsSystem Spec
.


23 Apr 2011   #4

Vista x64 / 7 X64
 
 

You're welcome
My System SpecsSystem Spec
Reply

 Dir CMD not reading as it did problems?



Thread Tools



Similar help and support threads for: Dir CMD not reading as it did
Thread Forum
Reading a old HD Hardware & Devices
Some useful reading here System Security
What are you reading Chillout Room
Reading fan RPM's Hardware & Devices
not reading DVD Installation & Setup


All times are GMT -5. The time now is 06:05 PM.



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