File names and Dates from directory
Moderators: chulett, rschirm, roy
File names and Dates from directory
Is there a way to insert the file names and dates into a file or table?
I used the DOS "dir" command to get the names, dates (plus a whole lot more information) in a routine but now I would like to parse this info and put it in a file or a table. Just the file name and dates.
Can the folder stage do this?
I used the DOS "dir" command to get the names, dates (plus a whole lot more information) in a routine but now I would like to parse this info and put it in a file or a table. Just the file name and dates.
Can the folder stage do this?
Thanks Craig.
There is no option for Enterprise Edition
Do you have suggestions on how to parse the data? Here is sample what it looks like:
There is no option for Enterprise Edition
Do you have suggestions on how to parse the data? Here is sample what it looks like:
- Volume in drive E is SysVol2, Volume Serial Number is AMM1234,, Directory of E:\XData\EEE\BOL,,09/07/2011 08:07 PM 364,636 ByTest.txt,05/31/2011 11:26 PM 66,799 devqdescrip.txt,05/31/2011 11:26 PM 240,031, 75 File(s) 12,738,820 bytes, 0 Dir(s) 110,224,592,896 bytes free
Don't need one. Your questions are either for a specific job type (Server, Parallel or TX) and there are forums for each or a "general" question goes in the General forum. I sincerely doubt your questions are related in any way to the TX product, hence my question.rodre wrote:There is no option for Enterprise Edition
So are you looking for a Server solution or a Parallel solution?
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
How to eliminate summary part :
By using command stage in server job we can get the list of files and dates. In parallel by using External source stage we can get it (as said by kryton).
Here I have an output of file names and dates along with the summary :
My question is how to eliminate the summary part at the top and the bottom (mentioned in red) from output :
Output :
Volume in H
Volume Serial is
Directory of
01/04/2012 09:57 AM .
01/04/2012 09:57 AM ..
07/28/2011 05:24 AM 1_filetest.txt
07/28/2011 02:37 AM 1_test.txt
17 File(s) bytes
3 Dir(s) bytes
Thanks in Advance.
Here I have an output of file names and dates along with the summary :
My question is how to eliminate the summary part at the top and the bottom (mentioned in red) from output :
Output :
Volume in H
Volume Serial is
Directory of
01/04/2012 09:57 AM .
01/04/2012 09:57 AM ..
07/28/2011 05:24 AM 1_filetest.txt
07/28/2011 02:37 AM 1_test.txt
17 File(s) bytes
3 Dir(s) bytes
Thanks in Advance.
Last edited by Satwika on Fri Jan 20, 2012 5:45 am, edited 1 time in total.
Re: How to eliminate summary part :
Satwika, You can eliminate the above rows in execute command stage by
Code: Select all
#below command will remove first 7 lines of a file
sed 1,7d
and
# delete the last 2 lines of a file
sed 'N;$!P;$!D;$d'
But you should have installed MKS toolkit in order to what Muni told work for you.
Or else try your own with dos commands for the same purpose.
if you have mks toolkit, then the below will be more simpler :
i doubt, if you are using mks toolkit ,you can use "ls" command in stead of "dir"and you will not get these summary details.
Or else try your own with dos commands for the same purpose.
if you have mks toolkit, then the below will be more simpler :
Code: Select all
sed -e '1,7d' -e '$d'|sed '$d'
pandeeswaran