Home / Microsoft / Microsoft DOS / MS DOS
0 Members and 1 Guest are viewing this topic. « previous next »
Pages: [1] - (Bottom) Print
Author Topic: MS DOS  (Read 692 times)
Bari
Topic Starter
Starter



Posts: 4


« 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.
IP logged
progach
Rookie



Posts: 36

i am working hard to be the programmer

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

not well understood?
IP logged
TheShadow
Intermediate



Thanked: 8
Posts: 189

Certifications: List
Computer: Specs
Experience: Guru
OS: Windows XP


Old Timer in Florida

The Doctor 1
« 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  8)
IP logged

Experience is truly the best teacher.
Geek-9pm
Sage



Thanked: 327
Posts: 8,050

Computer: Specs
Experience: Familiar
OS: Windows XP


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?

IP logged
gh0std0g74
Apprentice



Thanked: 37
Posts: 590


« 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
IP logged

Vikram Varaprasad
Intermediate



Thanked: 6
Posts: 213




« 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.............
IP logged

Vikram...
gh0std0g74
Apprentice



Thanked: 37
Posts: 590


« 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)
IP logged

Bari
Topic Starter
Starter



Posts: 4


« 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.
IP logged
Bari
Topic Starter
Starter



Posts: 4


« 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
IP logged
gh0std0g74
Apprentice



Thanked: 37
Posts: 590


« 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.
IP logged

progach
Rookie



Posts: 36

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!
IP logged
Pages: [1] - (Top) Print 
Home / Microsoft / Microsoft DOS / MS DOS « previous next »
 


Login with username, password and session length

Old Forum Search | Forum Rules
Copyright © 2010 Computer Hope ® All rights reserved.
Powered by SMF 2.0 RC3 | SMF © 2006–2010, Simple Machines LLC
Page created in 0.075 seconds with 20 queries.