TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Yogesh Vedpathak
675
1.4k
192k
Get Files Based On Datemodfied (yesteday)using Batch Script
Jun 4 2018 4:47 AM
In My Folder there are a lot of files are stored , i want get only yesterday file names into excel sheet based on current date time ...so i can see all files names which are modified yesterday
using batch script
I tried hard but not getting Excpected output
Current Status: its show me all files name into excel sheet
Requirement:- Need to show yesteday files name into excel sheet
here is my code ......
@echo off
setlocal
rem Define folder to scan, and output file
for
CSV results
set BaseDir=E:\X\
set OutputFile=Archive.csv
(
rem Write column headers to output file
echo
"Doc Name"
,
" "
,
"File Type"
,
"Modified Date"
,
"File Path"
rem Process all files
in
all folders under base folder
for
/f
"tokens=*"
%%I
in
(
'dir /s/b/a-d "%BaseDir%"'
)
do
(
rem Write file data to output file
echo
"%%~nI"
,
""
,
"%%~xI"
,%%~tI,
"%%~dpI"
)
)>
"%OutputFile%"
rem Open output CSV file
in
Excel
for
analysis
start excel
"%OutputFile%"
rem Define folder to scan, and output file
for
CSV results
set BaseDir=E:\V\
set OutputFile=XBDArchive.csv
(
rem Write column headers to output file
echo
"Doc Name"
,
" "
,
"File Type"
,
"Modified Date"
,
"File Path"
rem Process all files
in
all folders under base folder
for
/f
"tokens=*"
%%I
in
(
'dir /s/b/a-d "%BaseDir%"'
)
do
(
rem Write file data to output file
echo
"%%~nI"
,
""
,
"%%~xI"
,%%~tI,
"%%~dpI"
)
)>
"%OutputFile%"
rem Open output CSV file
in
Excel
for
analysis
start excel
"%OutputFile%"
start
""
/wait cmd /c
"echo Opeartion Sucessful done !&echo(&pause"
Reply
Answers (
0
)
User Permission In MVC
How to implement Logout in asp .net while using frameset