|
View Full Version : Dir Cmd.
BaKaR 02-27-2004, 05:47 PM Hi.
Using: dir /s c:\ | find /i "some.file"
Ok, the result is positive.
But! how to get a Path to that file ? Dir cant reproduce it .. ?
Example:
* C:\>dir /s c:\ | find /i "winlogon.log"
26.02.2004 11:44 721 winlogon.log.lnk
So, i would like the: PATH/winlogon.log.lnk
Thank You.
--
*. Remove: "DnotSpamMe" When R_ing.
Phil Robyn [MVP] 02-27-2004, 06:19 PM BaKaR wrote:
> Hi.
>
> Using: dir /s c:\ | find /i "some.file"
> Ok, the result is positive.
> But! how to get a Path to that file ? Dir cant reproduce it .. ?
>
> Example:
>
> * C:\>dir /s c:\ | find /i "winlogon.log"
> 26.02.2004 11:44 721 winlogon.log.lnk
>
> So, i would like the: PATH/winlogon.log.lnk
>
>
> Thank You.
>
For just the path\filename:
dir /s /b c:\ | find /i "winlogon.log"
For the file date, time, size, path\filename:
for /f %a in ('dir /s /b c:\ ^| find /i "winlogon.log"') do @echo %~ta %~za %~fa
- - - - - - - - - - begin screen capture Win2000 - - - - - - - - - -
c:\cmd>dir /s /b c:\ | find /i "winlog"
c:\I386\WINLOGON.EX_
c:\WINNT\$NtUninstallKB824141$\winlogon.exe
c:\WINNT\$NtUninstallQ328310$\winlogon.exe
c:\WINNT\$NtUninstallQ329115$\winlogon.exe
c:\WINNT\security\logs\winlogon.log
c:\WINNT\security\logs\winlogon.old
c:\WINNT\ServicePackFiles\i386\winlogon.exe
c:\WINNT\system32\WINLOGON.EXE
c:\WINNT\system32\dllcache\WINLOGON.EXE
c:\cmd>for /f %a in ('dir /s /b c:\ ^| find /i "winlog"') do @echo %~ta %~za %~fa
12/07/99 04:00a 75521 c:\I386\WINLOGON.EX_
06/19/03 11:05a 181008 c:\WINNT\$NtUninstallKB824141$\winlogon.exe
08/15/02 06:30a 179472 c:\WINNT\$NtUninstallQ328310$\winlogon.exe
07/22/02 11:05a 178960 c:\WINNT\$NtUninstallQ329115$\winlogon.exe
02/27/04 01:26a 44718 c:\WINNT\security\logs\winlogon.log
02/24/04 10:54p 1059550 c:\WINNT\security\logs\winlogon.old
06/19/03 11:05a 181008 c:\WINNT\ServicePackFiles\i386\winlogon.exe
07/17/03 09:20a 182032 c:\WINNT\system32\WINLOGON.EXE
07/17/03 09:20a 182032 c:\WINNT\system32\dllcache\WINLOGON.EXE
- - - - - - - - - - end screen capture Win2000 - - - - - - - - - -
--
Phil Robyn
Univ. of California, Berkeley
u n z i p m y a d d r e s s t o s e n d e - m a i l
Phil Robyn [MVP] 02-27-2004, 06:19 PM BaKaR wrote:
> Hi.
>
> Using: dir /s c:\ | find /i "some.file"
> Ok, the result is positive.
> But! how to get a Path to that file ? Dir cant reproduce it .. ?
>
> Example:
>
> * C:\>dir /s c:\ | find /i "winlogon.log"
> 26.02.2004 11:44 721 winlogon.log.lnk
>
> So, i would like the: PATH/winlogon.log.lnk
>
>
> Thank You.
>
For just the path\filename:
dir /s /b c:\ | find /i "winlogon.log"
For the file date, time, size, path\filename:
for /f %a in ('dir /s /b c:\ ^| find /i "winlogon.log"') do @echo %~ta %~za %~fa
- - - - - - - - - - begin screen capture Win2000 - - - - - - - - - -
c:\cmd>dir /s /b c:\ | find /i "winlog"
c:\I386\WINLOGON.EX_
c:\WINNT\$NtUninstallKB824141$\winlogon.exe
c:\WINNT\$NtUninstallQ328310$\winlogon.exe
c:\WINNT\$NtUninstallQ329115$\winlogon.exe
c:\WINNT\security\logs\winlogon.log
c:\WINNT\security\logs\winlogon.old
c:\WINNT\ServicePackFiles\i386\winlogon.exe
c:\WINNT\system32\WINLOGON.EXE
c:\WINNT\system32\dllcache\WINLOGON.EXE
c:\cmd>for /f %a in ('dir /s /b c:\ ^| find /i "winlog"') do @echo %~ta %~za %~fa
12/07/99 04:00a 75521 c:\I386\WINLOGON.EX_
06/19/03 11:05a 181008 c:\WINNT\$NtUninstallKB824141$\winlogon.exe
08/15/02 06:30a 179472 c:\WINNT\$NtUninstallQ328310$\winlogon.exe
07/22/02 11:05a 178960 c:\WINNT\$NtUninstallQ329115$\winlogon.exe
02/27/04 01:26a 44718 c:\WINNT\security\logs\winlogon.log
02/24/04 10:54p 1059550 c:\WINNT\security\logs\winlogon.old
06/19/03 11:05a 181008 c:\WINNT\ServicePackFiles\i386\winlogon.exe
07/17/03 09:20a 182032 c:\WINNT\system32\WINLOGON.EXE
07/17/03 09:20a 182032 c:\WINNT\system32\dllcache\WINLOGON.EXE
- - - - - - - - - - end screen capture Win2000 - - - - - - - - - -
--
Phil Robyn
Univ. of California, Berkeley
u n z i p m y a d d r e s s t o s e n d e - m a i l
Bob I 02-27-2004, 06:29 PM Maybe I missed part of the question but
Why not ditch the "c:\ | find /i" part of this?
BaKaR wrote:
> Hi.
>
> Using: dir /s c:\ | find /i "some.file"
> Ok, the result is positive.
> But! how to get a Path to that file ? Dir cant reproduce it .. ?
>
> Example:
>
> * C:\>dir /s c:\ | find /i "winlogon.log"
> 26.02.2004 11:44 721 winlogon.log.lnk
>
> So, i would like the: PATH/winlogon.log.lnk
>
>
> Thank You.
>
>
Bob I 02-27-2004, 06:29 PM Maybe I missed part of the question but
Why not ditch the "c:\ | find /i" part of this?
BaKaR wrote:
> Hi.
>
> Using: dir /s c:\ | find /i "some.file"
> Ok, the result is positive.
> But! how to get a Path to that file ? Dir cant reproduce it .. ?
>
> Example:
>
> * C:\>dir /s c:\ | find /i "winlogon.log"
> 26.02.2004 11:44 721 winlogon.log.lnk
>
> So, i would like the: PATH/winlogon.log.lnk
>
>
> Thank You.
>
>
dir /b /s c:\winlogon.log
"BaKaR" <bakar@metro-cc.DnotSpamMe.hr> wrote in message
news:c1nvsl$u28$1@brown.net4u.hr...
>
> Hi.
>
> Using: dir /s c:\ | find /i "some.file"
> Ok, the result is positive.
> But! how to get a Path to that file ? Dir cant reproduce it .. ?
>
> Example:
>
> * C:\>dir /s c:\ | find /i "winlogon.log"
> 26.02.2004 11:44 721 winlogon.log.lnk
>
> So, i would like the: PATH/winlogon.log.lnk
>
>
> Thank You.
>
> --
>
> *. Remove: "DnotSpamMe" When R_ing.
>
>
dir /b /s c:\winlogon.log
"BaKaR" <bakar@metro-cc.DnotSpamMe.hr> wrote in message
news:c1nvsl$u28$1@brown.net4u.hr...
>
> Hi.
>
> Using: dir /s c:\ | find /i "some.file"
> Ok, the result is positive.
> But! how to get a Path to that file ? Dir cant reproduce it .. ?
>
> Example:
>
> * C:\>dir /s c:\ | find /i "winlogon.log"
> 26.02.2004 11:44 721 winlogon.log.lnk
>
> So, i would like the: PATH/winlogon.log.lnk
>
>
> Thank You.
>
> --
>
> *. Remove: "DnotSpamMe" When R_ing.
>
>
BaKaR 03-01-2004, 11:11 AM Ya, sorry, i missed the /b switch cauze i tryed regular dir /s /b and did get only file names, didnt tryed it in the dir /s /b c:\ |
find /i "winlogon" form, tought i did, but not.
Thank You All!
--
*. Remove: "DnotSpamMe" When R_ing.
"Phil Robyn [MVP]" <zipprobyn@berkeley.edu> wrote in message news:%23NdxD5V$DHA.3184@TK2MSFTNGP09.phx.gbl...
> BaKaR wrote:
> > Hi.
> >
> > Using: dir /s c:\ | find /i "some.file"
> > Ok, the result is positive.
> > But! how to get a Path to that file ? Dir cant reproduce it .. ?
> >
> > Example:
> >
> > * C:\>dir /s c:\ | find /i "winlogon.log"
> > 26.02.2004 11:44 721 winlogon.log.lnk
> >
> > So, i would like the: PATH/winlogon.log.lnk
> >
> >
> > Thank You.
> >
> For just the path\filename:
>
> dir /s /b c:\ | find /i "winlogon.log"
>
> For the file date, time, size, path\filename:
>
> for /f %a in ('dir /s /b c:\ ^| find /i "winlogon.log"') do @echo %~ta %~za %~fa
>
> - - - - - - - - - - begin screen capture Win2000 - - - - - - - - - -
> c:\cmd>dir /s /b c:\ | find /i "winlog"
> c:\I386\WINLOGON.EX_
> c:\WINNT\$NtUninstallKB824141$\winlogon.exe
> c:\WINNT\$NtUninstallQ328310$\winlogon.exe
> c:\WINNT\$NtUninstallQ329115$\winlogon.exe
> c:\WINNT\security\logs\winlogon.log
> c:\WINNT\security\logs\winlogon.old
> c:\WINNT\ServicePackFiles\i386\winlogon.exe
> c:\WINNT\system32\WINLOGON.EXE
> c:\WINNT\system32\dllcache\WINLOGON.EXE
>
> c:\cmd>for /f %a in ('dir /s /b c:\ ^| find /i "winlog"') do @echo %~ta %~za %~fa
> 12/07/99 04:00a 75521 c:\I386\WINLOGON.EX_
> 06/19/03 11:05a 181008 c:\WINNT\$NtUninstallKB824141$\winlogon.exe
> 08/15/02 06:30a 179472 c:\WINNT\$NtUninstallQ328310$\winlogon.exe
> 07/22/02 11:05a 178960 c:\WINNT\$NtUninstallQ329115$\winlogon.exe
> 02/27/04 01:26a 44718 c:\WINNT\security\logs\winlogon.log
> 02/24/04 10:54p 1059550 c:\WINNT\security\logs\winlogon.old
> 06/19/03 11:05a 181008 c:\WINNT\ServicePackFiles\i386\winlogon.exe
> 07/17/03 09:20a 182032 c:\WINNT\system32\WINLOGON.EXE
> 07/17/03 09:20a 182032 c:\WINNT\system32\dllcache\WINLOGON.EXE
> - - - - - - - - - - end screen capture Win2000 - - - - - - - - - -
>
> --
> Phil Robyn
> Univ. of California, Berkeley
>
> u n z i p m y a d d r e s s t o s e n d e - m a i l
>
BaKaR 03-01-2004, 11:11 AM Ya, sorry, i missed the /b switch cauze i tryed regular dir /s /b and did get only file names, didnt tryed it in the dir /s /b c:\ |
find /i "winlogon" form, tought i did, but not.
Thank You All!
--
*. Remove: "DnotSpamMe" When R_ing.
"Phil Robyn [MVP]" <zipprobyn@berkeley.edu> wrote in message news:%23NdxD5V$DHA.3184@TK2MSFTNGP09.phx.gbl...
> BaKaR wrote:
> > Hi.
> >
> > Using: dir /s c:\ | find /i "some.file"
> > Ok, the result is positive.
> > But! how to get a Path to that file ? Dir cant reproduce it .. ?
> >
> > Example:
> >
> > * C:\>dir /s c:\ | find /i "winlogon.log"
> > 26.02.2004 11:44 721 winlogon.log.lnk
> >
> > So, i would like the: PATH/winlogon.log.lnk
> >
> >
> > Thank You.
> >
> For just the path\filename:
>
> dir /s /b c:\ | find /i "winlogon.log"
>
> For the file date, time, size, path\filename:
>
> for /f %a in ('dir /s /b c:\ ^| find /i "winlogon.log"') do @echo %~ta %~za %~fa
>
> - - - - - - - - - - begin screen capture Win2000 - - - - - - - - - -
> c:\cmd>dir /s /b c:\ | find /i "winlog"
> c:\I386\WINLOGON.EX_
> c:\WINNT\$NtUninstallKB824141$\winlogon.exe
> c:\WINNT\$NtUninstallQ328310$\winlogon.exe
> c:\WINNT\$NtUninstallQ329115$\winlogon.exe
> c:\WINNT\security\logs\winlogon.log
> c:\WINNT\security\logs\winlogon.old
> c:\WINNT\ServicePackFiles\i386\winlogon.exe
> c:\WINNT\system32\WINLOGON.EXE
> c:\WINNT\system32\dllcache\WINLOGON.EXE
>
> c:\cmd>for /f %a in ('dir /s /b c:\ ^| find /i "winlog"') do @echo %~ta %~za %~fa
> 12/07/99 04:00a 75521 c:\I386\WINLOGON.EX_
> 06/19/03 11:05a 181008 c:\WINNT\$NtUninstallKB824141$\winlogon.exe
> 08/15/02 06:30a 179472 c:\WINNT\$NtUninstallQ328310$\winlogon.exe
> 07/22/02 11:05a 178960 c:\WINNT\$NtUninstallQ329115$\winlogon.exe
> 02/27/04 01:26a 44718 c:\WINNT\security\logs\winlogon.log
> 02/24/04 10:54p 1059550 c:\WINNT\security\logs\winlogon.old
> 06/19/03 11:05a 181008 c:\WINNT\ServicePackFiles\i386\winlogon.exe
> 07/17/03 09:20a 182032 c:\WINNT\system32\WINLOGON.EXE
> 07/17/03 09:20a 182032 c:\WINNT\system32\dllcache\WINLOGON.EXE
> - - - - - - - - - - end screen capture Win2000 - - - - - - - - - -
>
> --
> Phil Robyn
> Univ. of California, Berkeley
>
> u n z i p m y a d d r e s s t o s e n d e - m a i l
>
|
|
|