Computer Hope

Computer Hope Forum Welcome, Guest. Please login or register.
November 22, 2009, 03:29:48 PM
Home Help Staff Chat Login Register
News: Have your own custom built computer? Come join the self-built computer club.

Computer Hope Forums  >>  Microsoft  >>  Microsoft DOS (Moderator: Computer Hope Admin)  >>  Topic: MS DOS 0 Members and 1 Guest are viewing this topic. « previous next »
Pages: [1] - (Bottom) Print
Author Topic: MS DOS  (Read 446 times)
Bari
Topic Starter
Starter
*
Posts: 4

Thanked: 0
OS: Unknown
Experience: Beginner


« on: November 04, 2009, 03:20:28 AM »

Is there any query in MS DOS to view the files and folders of a particular week.
Logged
progach
Rookie
*
Posts: 34

Thanked: 0
OS: Windows Vista
Experience: Experienced
Certifications: List



i am working hard to be the programmer


« Reply #1 on: November 04, 2009, 04:44:24 AM »

not well understood?
Logged
TheShadow
Beginner
*
Posts: 94

Thanked: 5
OS: Windows XP
Computer: Specs
Experience: Guru




WWW
« Reply #2 on: November 04, 2009, 04:33:08 PM »

It sounds like you'll need to use the "DIR" command, but you'll also need to use a specific switch.

I don't have a copy of all the DIR switches at hand, but if you'll go to a command prompt and type,
Dir /H >C:\dir.txt you should get a list of those commands, saved to a text file in your root directory, called "dir.txt".

I use that technique often to get a list of all the switches for any DOS command.

good luck,
The Shadow  Cool
Logged

Geek-9pm
Expert
*
Posts: 2378

Thanked: 66
OS: Windows Vista
Computer: Specs
Experience: Experienced



Geek After Dark


« Reply #3 on: November 04, 2009, 08:54:55 PM »

Quote
Is there any query in MS DOS to view the files and folders of a particular week.
No.

Can you make one?
Maybe, a lot of hassle.

Easier to do in Windows. Why do you need it int DOS?

Logged
gh0std0g74
Apprentice
*
Posts: 546

Thanked: 34
OS: Linux Variant
Experience: Experienced


« Reply #4 on: November 04, 2009, 09:59:18 PM »

Easier to do in Windows. Why do you need it int DOS?
1) maybe he didn't phrase it well
2) he wants to automate it, after all, he is posting here.
I don't think he doesn't know how to do it with Windows since Windows is idiot proof

@OP, a vbscript you can use here
Logged

Vikram Varaprasad
Intermediate
*
Posts: 168

Thanked: 4
OS: Windows XP
Computer: Specs
Experience: Experienced




« Reply #5 on: November 05, 2009, 12:59:52 AM »

I can help you a little bit. Just related to your question. Here is the dos command that retrieves the files of particular date.

C:\dir > text.txt | find /n "10/28/2009" text.txt

here dir will gives the results of the files and directories list. That list will be saved to text.txt file through the command "dir > text.txt"

"|" will be used to combine two commands to run one after another. Here dir > text.txt
will be executed first there after the remaining part.

find /n will dispaly the line numbers with the lines that matches your string
The string can be given in double quotations " " . Here I gave the time period usually dos displays mm/dd/yyyy. Provide the date in the quotations that you request to retrieve from the file text.txt ( You may save the dir results to some other file, but you have to provide that file in the find command).

Hope this will help you a little bit.............
Logged

Vikram...
gh0std0g74
Apprentice
*
Posts: 546

Thanked: 34
OS: Linux Variant
Experience: Experienced


« Reply #6 on: November 05, 2009, 01:17:56 AM »

if that's the case, why not directly pipe to find without creating an intermediate file. Also, its not that simple as regard to OP's question. He wants to find files/folders of particular week, not a date. Although more information from OP is needed to clarify whether does he mean the weeks of a month (ie, 1st week, 2nd week....till 4th week) , or a week in a year ( ie, 1 to 52)
Logged

Bari
Topic Starter
Starter
*
Posts: 4

Thanked: 0
OS: Unknown
Experience: Beginner


« Reply #7 on: November 05, 2009, 04:02:49 AM »

"whether does he mean the weeks of a month (ie, 1st week, 2nd week....till 4th week) , or a week in a year ( ie, 1 to 52)"

i would like to display the files/folders of 2nd week as well a particular week.
Logged
Bari
Topic Starter
Starter
*
Posts: 4

Thanked: 0
OS: Unknown
Experience: Beginner


« Reply #8 on: November 05, 2009, 04:06:20 AM »

I would like to see the files/folders of 2nd week

or any particular given week only.  Is there any possibility in MS DOS to view or execute such query.

I am familier with Windows, but i want this query to run in dos
Logged
gh0std0g74
Apprentice
*
Posts: 546

Thanked: 34
OS: Linux Variant
Experience: Experienced


« Reply #9 on: November 05, 2009, 04:25:44 AM »

I would like to see the files/folders of 2nd week

or any particular given week only.  Is there any possibility in MS DOS to view or execute such query.

I am familier with Windows, but i want this query to run in dos
then use "w" for weekday, "ww" for week of the year in link i gave you. IF you want to do that in pure batch, it can be done, BUT it will kill your brain cells.
Logged

progach
Rookie
*
Posts: 34

Thanked: 0
OS: Windows Vista
Experience: Experienced
Certifications: List



i am working hard to be the programmer


« Reply #10 on: November 05, 2009, 03:31:00 PM »


BUT it will kill your brain cells.
it will man with bathch files yeah suerly!
Logged
Pages: [1] - (Top) Print 
Computer Hope Forums  >>  Microsoft  >>  Microsoft DOS (Moderator: Computer Hope Admin)  >>  Topic: MS DOS « previous next »
Jump to:  


Login with username, password and session length

Old Forum Search | Forum Rules
Copyright 1998-2008 by Computer Hope (tm). All rights reserved
Powered by SMF 1.1.8 | SMF © 2006-2008, Simple Machines LLC
Page created in 0.083 seconds with 19 queries.