Search found 6 matches

by sabercats
30 Oct 2012 11:53
Forum: DOS Batch Forum
Topic: Read file and show field number
Replies: 7
Views: 5355

Re: Read file and show field number

Thanks all, it works.
by sabercats
29 Oct 2012 17:05
Forum: DOS Batch Forum
Topic: Read file and show field number
Replies: 7
Views: 5355

Read file and show field number

I have a flat files ; ex A.txt 10/29/2012 1:37 PM|Available|sabercats-pc|San Jose|sanjose@somewhere.com|Win7|NCFF|Release|sanjoseWin7|AAA123|1351546670 10/29/2012 1:38 PM|Available|tigers-pc|New York|newyork@somewhere.com|Win8|NCFF|Releasing|tigersWin8|AAA123|1351546736 How do i get field sanjoseWin...
by sabercats
19 Jun 2012 17:29
Forum: DOS Batch Forum
Topic: batch file to read a 2nd field in flatfile (dos)
Replies: 2
Views: 2440

batch file to read a 2nd field in flatfile (dos)

I have a log file \from\where\some\directory\log.txt 54,SABERCATSWIN7x64,sabercats-pc,,,2012-06-19 15:36:42.000,,,,,,, 3,SABERCATSWIN7,sabercats-pc,,,2012-06-18 15:44:53.000,,,,,,,, How do we write dos batch file to get the hostname of the old start time (automatically in 2nd lines) like sabercatswi...
by sabercats
25 May 2011 17:20
Forum: DOS Batch Forum
Topic: Get newest directory ?
Replies: 2
Views: 3488

Re: Get newest directory ?

Somehow i tried yours and it did not work, but this work for me @echo off set indir=\\Where\we\get\new\folder set outdir=\\Where\we\make\a\backup for /f "usebackq delims=" %%i in (`dir "%indir%" /ad /o-d /b`) do ( set recent=%%i goto cont ) :cont % xcopy \\Where\we\get\new\folder...
by sabercats
18 May 2011 16:10
Forum: DOS Batch Forum
Topic: Get newest directory ?
Replies: 2
Views: 3488

Get newest directory ?

How do you get an newest directory in a folder and copy that new folder to another place?
1. Go to \\Where\we\get\new\folder
2. Call that latest foldername = recent
3. xcopy \\Where\we\get\new\folder\recent \\Where\we\make\a\backup\ /D/S/E

Thanks,