Inodes in DOS

Hewlett-packard Ms windows server 2003 r...
October 28, 2009 at 11:58:03
Specs: Windows XP, Quad Core / 4Gig
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.

See More: Inodes in DOS

Report •


#1
October 28, 2009 at 12:23:55
What's Imode?


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

M2


Report •

#2
October 28, 2009 at 12:47:52
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.


Report •

#3
October 28, 2009 at 13:05:44
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.

Report •

Related Solutions

#4
October 28, 2009 at 13:21:15
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.


Report •

#5
October 28, 2009 at 14:56:06
I don't know where this is headed but it has nothing to do with DOS.


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

M2


Report •

#6
October 28, 2009 at 22:51:28
inodes are unix based. they are different to DOS.

GNU win32 packages | Gawk


Report •

#7
October 29, 2009 at 09:07:29
Better idea?
for /f "delims=" %%a in ('dir /od /b') do @echo %%a


Report •

#8
October 29, 2009 at 09:40:58
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.

Report •

#9
October 29, 2009 at 09:50:56
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


Report •


Ask Question