Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.
find todays file in one folder usei
Name: vishuonly4u Date: April 15, 2008 at 22:28:11 Pacific OS: DOS CPU/Ram: p5 Product: Intel
Comment:
Hello.. need ur help. Every day at 8:00 we get one file in d:\tmp\ with file name as test1.dat*** (*** are some random numbers) now I want to search for a todays test1.dat*** file from that folder. That folder allready contain many old test1.dat*** files. And I dont want to use any temp file to store results. could pls suggest me way for this.
Name: devil_himself Date: April 15, 2008 at 23:18:16 Pacific
Reply:
::Find all the files made today in a folder @echo off & setlocal enabledelayedexpansion for %%f in ("d:\tmp\*.*") do ( echo "%%~tf" | find "%date%" > nul if !errorlevel! EQU 0 echo %%~tf %%~zf "%%~ff" )
0
Response Number 2
Name: vishuonly4u Date: April 15, 2008 at 23:30:20 Pacific
Reply:
@echo off & setlocal enabledelayedexpansion for %%f in ("d:\tmp\*.*") do ( echo "%%~tf" | find "%date%" > nul if !errorlevel! EQU 0 echo %%~tf %%~zf "%%~ff" )
Dont understand how it works.. could you please explain me in short.
I was thinking of a FIND command with dir some thing like dir test1.dat* | find /c "current date" this will return me the value 1 if we have file today. but I am not able to store this value in variable. and i dont want to use a file to store this value.
0
Response Number 3
Name: vishuonly4u Date: April 15, 2008 at 23:47:42 Pacific
Reply:
Thanks got to know how it works... this is solution that i asked for... many thanks.
Summary: im running win 98 i'm running a batch file can be find a file inside one folder and copy into one file. let say.. ask user to enter filename.. check wether the file exist or not in C:\foldername.. if ...
Summary: I have a large amount of folders with many files in each one and I want to to be able to rename all of the files in the sub folders to the name of the folder with numbers in the form 001 002 etc. so t...
Summary: Hi Thanks for your reply.. I run the following script, but the result is definitley not the oldest file in the folder: @echo off for /f "tokens=1-4 delims= " %%a in ('dir /a-d /od /tw ^| find ":"') d...