Computing.Net > Forums > Programming > Inodes in DOS

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.

Inodes in DOS

Reply to Message Icon

Name: ace_omega
Date: October 28, 2009 at 11:58:03 Pacific
OS: Windows XP
CPU/Ram: Quad Core / 4Gig
Product: Hp (hewlett-packard) Ms windows server 2003 r2 ent option kit hewlett packard
Subcategory: Batch
Comment:

Does any one know how to get the equivilent of an Inode in DOS?
I am trying to write a clean up program that will compare the files last modified date with the current date.



Sponsored Link
Ads by Google

Response Number 1
Name: Mechanix2Go
Date: October 28, 2009 at 12:23:55 Pacific
Reply:

What's Imode?


=====================================
Helping others achieve escape felicity

M2


0

Response Number 2
Name: ace_omega
Date: October 28, 2009 at 12:47:52 Pacific
Reply:

Click here....

http://www.cyberciti.biz/tips/under...

Never Mind though, I think I am going to use...

DIR /OU > temp.txt and just try to use it in a for loop with delimiters.


0

Response Number 3
Name: FishMonger
Date: October 28, 2009 at 13:05:44 Pacific
Reply:

A better option would be to use a language, such as Perl, Python, VB, that can stat the file to retrieve most of the same info that the Linux stat command returns.


0

Response Number 4
Name: ace_omega
Date: October 28, 2009 at 13:21:15 Pacific
Reply:

Ok here is what I have...

@echo off
dir /OD
For /F "tokens=1,2,3,4,5,6,7,8 delims= " %%A in ('DIR /OD') do @(
  Echo %%A
  Echo %%F
  )
pause

But only some of the files are listing. I have a feeling the the delimiter is not a space but a tab. The problem is I can not figure out how to get ascii characters for the system command in notepad. The Character mapper only allows me to use DEC 22 and up. I need ascii 9 for the tab. Is there any way to do an equivalent of CHR(9) in CMD? I can do it using COPY CON then use the Alt+009 thing but copy con is worse than VI.

Yes, I could do a VB script but I would like to figure it out in CMD.


0

Response Number 5
Name: Mechanix2Go
Date: October 28, 2009 at 14:56:06 Pacific
Reply:

I don't know where this is headed but it has nothing to do with DOS.


=====================================
Helping others achieve escape felicity

M2


0

Related Posts

See More



Response Number 6
Name: ghostdog
Date: October 28, 2009 at 22:51:28 Pacific
Reply:

inodes are unix based. they are different to DOS.

GNU win32 packages | Gawk


0

Response Number 7
Name: Razor2.3
Date: October 29, 2009 at 09:07:29 Pacific
Reply:

Better idea?

for /f "delims=" %%a in ('dir /od /b') do @echo %%a


0

Response Number 8
Name: ace_omega
Date: October 29, 2009 at 09:40:58 Pacific
Reply:

the problem with /b is that it does not give me the dates. I need the dates so that I can compare them with the current date and only delete files that are so old.


0

Response Number 9
Name: Razor2.3
Date: October 29, 2009 at 09:50:56 Pacific
Reply:

Date math in CMD is a terrible idea. VBScript is just as native, and it has proper date math.

EDIT: Once I get off my soapbox, I'll probably throw this out there:

for /f "delims=" %%a in ('dir /b /od') do @echo %%~TFa


0

Sponsored Link
Ads by Google
Reply to Message Icon





Use following form to reply to current message:

Login or Register to Reply
LoginRegister


Sponsored links

Ads by Google


Results for: Inodes in DOS

Access Reporting in DOS MODE www.computing.net/answers/programming/access-reporting-in-dos-mode/3314.html

Screen Saver in DOS App www.computing.net/answers/programming/screen-saver-in-dos-app/13828.html

Display an image in DOS www.computing.net/answers/programming/display-an-image-in-dos/12671.html