File with list of .txt files in a specific directory

Hi,
I need to create a file with list of .txt files in a specific directory (actually the command will be used by a java application).
I am using the below command,
ls home/apptmt/park/*.txt > home/apptmt/park/reportgen.txt
but this command prints output as
home/apptmt/park/report1.txt
home/apptmt/park/report2.txt
home/apptmt/park/report3.txt
I need only the files in reportgen.txt file, like
report1.txt
report2.txt
report3.txt
any one help me on the command I should use to get this output?
Thanks
MT

Thank you Dude!
I just found out that
cd /home/apptmt/park;ls *.txt > reportgen.lst works for me...
I will try this one as well... thank you very much...
MT

Similar Messages

  • Background processing of S_ALR_87013558 report with output in txt file

    Dear Friend's,
    Here I have a requirement of, to execute standard report S_ALR_87013558 (Budget/Actual/Commitment/Rem Plan/Assigned) in background processing mode. Here we have to run this report in background on daily basis at a particular given time.
    Once this report gets executed in background, output of this report should get converted automatically into txt file and this converted txt file must be downloaded in a respective folder automatically by giving desired path.
    After completion of this process, downloaded txt file they have to use for internal MIS reporting purpose.
    Is this possible via standard PS or else I have to go for the development.Please suggest, what should be the approach?
    Regards,
    Sandeep

    Hi Sandeep,
    Check if you can create batch job to run for S_ALR_87013558 using SM36
    The Program name is GP8YTY7TBR1TYRPCIPKAC6X9GZG
    Please check with ABAP.
    Regards,
    Nitin

  • How do I save a file as an unformatted txt file instead of html or rtf?

    How do I save a file as an unformatted txt file instead of html or rtf?

    Use menu Image>Image Size in the image size dialog uncheck Resample and enter 300 in the resolution field and click OK.  Note no Pixels are changed only the resolution setting get changed.  The use Menu Fils>Save As in the save as dialog use the file type pull down and select Tiff then click Save
    In the Tiff Option Dialog in the Image Compression  section set None The click OK.

  • OneDrive stopped returning files with a "+" in its file name.

    Hi,
    My app creates a folder in OneDrive in the name of the app and saves a data file with the same name in it.  My app name contains a "+" in the name.  For example "Menu+ Inventory.dat"
    All was working well for last couple of years and suddenly OneDrive is not returning files with a "+" in its name for the last few days.  Many of my app users will loose data if the file couldn't be retrieved from OneDrive.
    // Runs a search query on SkyDrive to find a matching file.
    function searchForFile(path) {
    var whenFolderFound = _searchForFolder();
    var skyDriveSearchPath = "/me/skydrive/search?q=" + path;
    // Runs async search for the user-specified file.
    var whenFilesFound = WL.api({
    path: skyDriveSearchPath,
    method: "GET"
    }).then(function (response) {
    if (response != null) {
    return WinJS.Promise.wrap(response);
    } else {
    inMemoryFile = null;
    return WinJS.Promise.wrap(false);
    In the SkyDrive Roaming Data sample, in the above function, if the skyDriveSearchPath has the above mentioned filename, the response doesn't have the file.  The sample app will create the file, save data with that name, but does not read the file. It
    can read other files with no "+" in the file name.
    Is there a change in OneDrive naming specs recently? 

    Sorted. Well sort of. I still have the problem but I know why. Apparently O2 will not allow anyone to send an attachment which has a space in the name. They claim that this reduces spam - no idea why they think that will stop spam but there you go...

  • I'm so confused!! I just want to create interactive pdf files (with video and flash files), but this free trial version is confusing!! help!?!

    i'm so confused!! I just want to create interactive pdf files (with video and flash files), but this free trial version is confusing!! help!?!

    Thanks for your suggestions. I checked to see if the options you suggested were set incorrectly but they were set to sync all. This led me to think the problem was actually in the iphone. I re-initialized the iphone and did not allow the system to restore any of the previous settings. In essence, I forced the phone to reset to factory settings. Then my video podcasts started syncing. All is well now. I did notice that I had seven podcasts selected that were "HD" presentations, and as such, are not compatible with the iphone. I don't know if this had anything to do with my earlier situation, but now I'm getting the video podcasts automatically. I'm happy. It wasn't much fun forcing the iphone to forget all of my preferences and I'm still customizing the phone now several days later. I think I have everything working and back to normal except I haven't identified any of my email accounts as of yet. Thanks for your help.

  • HT5071 Please Help! how do I fix this error: "The title of the Table of Contents in portrait view is placeholder text : Book Title. Please redeliver your corrected full book file with a custom preview file. "

    Urgent.
    I have been not approved of this error
    been back and forth with Apple
    The title of the Table of Contents in portrait view is placeholder text : Book Title. Please redeliver your corrected full book file with a custom preview file. The book will not go live in the store without a matching custom preview file."
    1st, how do you clarify the Table of Contents issue. No idea what I am doing wrong
    2nd what is a customr preview file?  I uploaded a sample book already.
    Please advise ASAP
    my email: [email protected]
    thanks

    I double check my table of content and I do not have a place holder... so I don't understand the error.

  • Merging a fragment file with a MANIFEST.MF file doesn't work when deploying

    Hi all,
    In the deployment process of a JAR file, if you check the option “Include Manifest.mf (META-INF/MANIFEST.MF)” when trying to merge a file with the MANIFEST.MF file (fragment file), without including a Main class, the operation is not done using JDeveloper 10.1.3.3.
    If you analyze the final MANIFEST.MF file within your JAR file generated, you will notice that the MANIFEST.MF contents don’t include the contents of the fragment file used.
    These are the fragment file contents (one blank space between different paths):
    Class-Path: ../jarlibs/Jdom.jar ../jarlibs/Jxl.jar
    This is the final MANIFEST.MF generated:
    Manifest-Version: 1.0
    Created-By: Oracle JDeveloper 10.1.3.3.0
    I hope you will help me a little!
    Best regards,
    user629401.

    hi user629401
    I tried what you describe using JDeveloper 10.1.3.3 and at first I saw the same behaviour you had.
    I checked the help topic "Deployment Profile Properties - JAR Options Page" that says:
    "+*Additional Manifest Files to Merge into MANIFEST.MF*+
    +You can specify additional manifest files that should be merged into the manifest file that is generated by JDeveloper. ...+"
    I searched this forum, and I found this message:
    Re: Deployment profiles
    "+... the merge function works if the file to merge in to MANIFEST.MF ends with an empty line i.e. there is a CR/LF after the last entry ...+"
    So, I tried that, and it worked for me.
    (tip : You can use "Your Control Panel" to make your name visible in forum posts.)
    success
    Jan Vervecken

  • Hi I seem have created duplicate preference files With the suffix "lock file". Is this normal? Thanks Geoff

    I just been looking in my preference file folder to throw away the preferences for Final Cut and there seems to be duplications of the preference files with the suffix “lock file". Is this normal in OS 10.7? I look forward to any advice.
    Many thanks Geoff

    I ended up logging an SR on Metalink. Here's the answer I got back:
    ---<snip>---
    Yes, 500 MB is normal for 11.1.0.7.
    First, you are correct, there is a log rotation policy. This is done automatically by Oracle for the Crsd, Ocssd, Evmd logs .
    The default size of the cssd log after which they would be recycled in previous versions was 10MB. This has changed in 11.1.0.7 such that the size after which the logs are recycled is 50MB. This means that customers may see an increase in the CRS_HOME required from 100MB to 500MB. Customers whose home size cannot accommodate this should move the old ocssd.l0* files to another destination. Please do not move the existing ocssd.log file.
    ---<snip>---

  • Create book file on basis of txt file with local paths?

    I would like to be able to create a book file in FrameMaker 7 or FrameMaker 9 on the basis of a  .txt file reading for instance:
    c:/documents/job.fm
    c:/documents/15ss.fm
    c:/documents/sdf/job1.fm
    Preferrably I would like to be able to paste the lines into a prompt and have a script compiling the book file.
    Is it possible to write a script using FrameMakers API which would do this trick? It is probably possible to use FrameScript but I am not too keen on FrameScript and would rather avoid it.
    Who should one ask in order to have such a thing written?
    regards
    Bjørn

    StudioSm wrote:
    I would like to be able to create a book file in FrameMaker 7 or FrameMaker 9 on the basis of a  .txt file reading for instance:
    c:/documents/job.fm
    c:/documents/15ss.fm
    c:/documents/sdf/job1.fm
    Preferrably I would like to be able to paste the lines into a prompt and have a script compiling the book file.
    Is it possible to write a script using FrameMakers API which would do this trick? It is probably possible to use FrameScript but I am not too keen on FrameScript and would rather avoid it.
    Who should one ask in order to have such a thing written?
    regards
    Bjørn
    I started using FrameMaker in release 2.x, while I was using x-roff on UNIX; x-roff used a "makefile" to create books from independent chapters, doing all the pagination, numbering, etc. I suspected that FrameMaker's book file worked like that, but it wasn't until many years later that I met someone who'd worked with FrameMaker version 1.x, who confirmed my suspicion.
    Although I can't tell you how to do it, I'm certain that it can be programmed as you want, and that someone will post more information.
    HTH
    Regards,
    Peter
    Peter Gold
    KnowHow ProServices

  • How to initialize Object  Array Data Provider (OADP)with data from txt file

    Hi,
    I want to show in a table some columnar data from a txt file. I ran the creator demo application on OADP successfully. http://blogs.sun.com/divas/entry/using_the_object_array_data
    I created a javabean class to read a txt file.However, I am stuck at how I can fill the data into an OADP array:
    I am familiar with C extensively but not much at java. can anyone help??
    thanks..
    dr.am.mohan rao

    Thanks for that. I changed it a little bit, but when i ran this script, got ORA-06532: Subscript outside of limit.
    declare
    O_voucher_comment SYSADM.AP_COMMENT_COLL := sysadm.ap_comment_coll(null);
    begin
    FAS_AP_EXCEPTIONS.GET_VOUCHER_COMMENTS('FCCAN', '20494753', 0, 'KEHE', O_voucher_comment);
    end;
    PROCEDURE get_voucher_comments (
    v_bu_in IN VARCHAR2,
    v_voucher_in IN VARCHAR2,
    v_line_in IN NUMBER,
    v_userid IN VARCHAR2,
    voucher_comment OUT      sysadm.ap_comment_coll
    IS
    i NUMBER := 1;
    v_comments VARCHAR2 (254) := ' ';
    comment_type sysadm.ap_comment_type;
    v_line_num NUMBER := 0;
    CURSOR get_all_comment
    IS
    SELECT voucher_line_num, descr254_mixed FROM ps_fas_ap_comment
    WHERE business_unit = v_bu_in AND voucher_id = v_voucher_in;
    CURSOR get_line_comment
    IS
    SELECT descr254_mixed FROM ps_fas_ap_comment
    WHERE business_unit = v_bu_in AND voucher_id = v_voucher_in
    AND voucher_line_num = v_line_in;
    BEGIN
    --voucher_comment() := SYSADM.ap_comment_type (NULL, NULL, NULL, NULL, NULL, NULL);
    --' ', ' ', 0, ' ', '', ' ' sysadm.ap_comment_coll
    voucher_comment := sysadm.ap_comment_coll(null);
    IF v_line_in = 0
    THEN
    OPEN get_all_comment;
    LOOP
    FETCH get_all_comment
    INTO v_line_num, v_comments;
              if i > 1
              then
                   voucher_comment.EXTEND;
              end if;
    voucher_comment (i) := ap_comment_type (v_bu_in,
    v_voucher_in, v_line_num, v_userid,
    TO_DATE (TO_CHAR (SYSDATE, 'DD-MON-YYYY HH24:MI:SS'), 'DD-MON-YYYY HH24:MI:SS'), v_comments );
    i := i + 1;
    END LOOP;
    ELSE
    OPEN get_line_comment;
    LOOP
    FETCH get_line_comment
    INTO v_comments;
              voucher_comment.extend(6);
    voucher_comment (i) := ap_comment_type (v_bu_in, v_voucher_in, v_line_num, v_userid, TO_DATE (TO_CHAR (SYSDATE, 'DD-MON-YYYY HH24:MI:SS' ), 'DD-MON-YYYY HH24:MI:SS'), v_comments);
    i := i + 1;
    END LOOP;
    END IF;
    END get_voucher_comments;

  • Applescript set selection to list from txt file

    For an AppleScript I am writing, I need to have the program select certain song names in iTunes. Basically, I have a txt file with the song names and I want the AppleScript to select exactly those names. For instance, the txt file looks like
    Track1
    Track2
    Track3
    Track4
    Track5
    with the track names replaced with the actual song names. Every track in seperated by one return, although I can reformat the file to add more returns if necessary. I would like to write something like:
    tell application "iTunes"
         set sel to --every track in the txt file--
         ---rest of my code---
    end tell
    I hope this was clear. Any ideas? Thanks!

    Thanks again DFGray for the comments. 
    After the correlations to find the peak positions, i just take the max value.  And you are right the accuracy is limited by the number of  samples per cycle.  Perhaps it would be clearer if you see the code.
    1) Basically I get a signal on the up and downslope of the sine wave.  On the down slope however the signal is negative, i.e. its is flipped.  So before I shift and average...I 'cut' the waveform into 4 (when cycles per buffer = 2, then I get 4 signals, 2 on the up slope and 2 on down slope) bits.  Counting from one, I flip the even number, cut it, and but an array of waveforms which is then sent to be convolved and shifted.
    2) Array of waveforms are stored to be phased shifted (Convolve and shift vi) and averaged (entire averaging vi which uses the convolve and shift vi as a sub vi). 
    * Phase shifting doesn't work when I cut and put it together (So something is wrong in cut waveform vi) 
    * Also if it isn't too time consuming could you give me an example of interpolating and shifting thing.
    * Also if you have any comments regarding the following VIs please let me know.  
    Thanks 
    Attached is:
    1) Cut waveform vi
    2) Convolve and shift
    3) Entire averaging 
    Attachments:
    SubVICutWaveforms.vi ‏37 KB
    SubVIConvolveShift.vi ‏30 KB
    SubVIEntireAveraging2.vi ‏43 KB

  • Help with input output .txt files!

    Hi i'm a student and totally new to programming. I need the program to read a .txt file and then output it:
    import java.io.*;
    import java.util.*;
    public class Reading{
         public static void main(String[] args)throws Exception{
              Scanner scanner = new Scanner(new File(args[0]));
              while(scanner.hasNext()){
                   System.out.println(scanner.next());
              scanner.close();
    and
    import java.io.*;
    public class Writing{
         public static void main(String[] args)throws Exception{
              String outputFile = args[0];
              PrintWriter writer = new PrintWriter(new BufferedWriter(new FileWriter(outputFile)));
              for(int i = 0; i < 100; i++){
                   writer.println(i * i);
              writer.close();
    How would i merge these together? I also changed the command line to java Reading Input.txt but it wont run on DrJava on my computer or laptop and i get an error? How do i then store the strings into an arraylist and iterate throught the arraylist to reverse the strings?
    Please help.

    You could do this...
    import java.io.*;
    import java.util.*;
    public class FileIO2
         public static void main(String argsp[])
              String readfile="ajr.txt";
              String writefile="ajr2.txt";
              try{
              read(readfile);
              write(writefile);
              catch(Exception e)
              {e.printStackTrace();}
         public static void read(String filename) throws Exception
              Scanner scanner = new Scanner(new File(filename));
              while(scanner.hasNext()){
                   System.out.println(scanner.next());
              scanner.close();
         public static void write(String filename) throws Exception
              String outputFile = filename;
              PrintWriter writer = new PrintWriter(new BufferedWriter(new FileWriter(outputFile)));
              for(int i = 0; i < 100; i++){
                   writer.println(i * i);
              writer.close();
    }

  • Powershell: There is no file with URL error during file upload.

    I am trying to put together a PowerShell script that I could use to upload files from a local directory, into a Document Library in a Record Center Site. Here is what my script looks like...
    #Open web and library
    $web = Get-SPWeb $webUrl
    $docLibrary = $web.Lists[$docLibraryName]
    $files = ([System.IO.DirectoryInfo] (Get-Item $localFolderPath)).GetFiles()
    Write-Host "Local Directory:" $localFolderPath
    ForEach($file in $files)
    Write-Host "Looping through files"
    Write-Host "Current file:" $file
    ElseIf ($contentType = "MyContentType")
    #Open file
    $fileStream = ([System.IO.FileInfo] (Get-Item $file.FullName)).OpenRead()
    # Gather the file name
    $FileName = $File.Name
    #remove file extension
    $NewName = [IO.Path]::GetFileNameWithoutExtension($FileName)
    #split the file name by the "-" character
    $FileNameArray = $NewName.split("_")
    $check = $FileNameArray.Length
    #Add file
    $folder = $web.getfolder($docLibraryUrlName)
    write-host "Copying file " $file.Name " to " $folder.ServerRelativeUrl "..."
    $spFile = $folder.Files.Add($folder.Url + "/" + $file.Name, [System.IO.Stream]$fileStream, $true)
    $spItem = $spFile.Item
    write-host "Success"
    #populate columns
    $spItem["Application Number"] = $FileNameArray[0].ToString()
    $spItem["Site Number"] = $FileNameArray[1].ToString()
    $spItem.Update()
    $fileStream.Close();
    Each time I run my script, I get this error message 
    Exception calling "Add" with "3" argument(s): "<nativehr>0x80070003</nativehr><nativestack></nativestack>There is no file with URL 'http://myRecordLibrarySite/myRecord Library/12587_B2317.PDF' in this Web."
    At C:\powershellscripts\Upload-FilesIntoSharePoint.ps1:72 char:6
    +                     $spFile = $folder.Files.Add($folder.Url + "/" + $file.Name, [System.IO.Stre ...
    +    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException
        + FullyQualifiedErrorId : DirectoryNotFoundException
    I have not been able to nail down why the script is failing. Any ideas why? Thanks for the help.

    I just figured out the issue with adding the file. I went in this direction, and my code has progressed forward.
    $folder = $web.getfolder($docLibrary.rootFolder.URL)

  • Error when opening XLSX file with Excel 2003 SP3, file does open but in read only mode with temporary name

    I am using Excel 2003 SP3 and have the Office 2007 compatibility pack installed.  When I open Office 2007 formatted Excel files (XSLX) directly in Windows Explorer, I receive the following error if I do not have Excel already opened:
    "Windows cannot find '<path to file>'.  Make sure you typed the name correctly, and then try again.  To search for a file, click the Start button, and then click Search."
    Even though I receive the error, the file does open; however, it opens in Read Only mode with a name such as "Xl0000024.xls".  The number seems to increment up each time it happens.
    Now here is the strange part.  If I have Excel already open and try to open the file in Windows Explorer, the file opens fine in Modify mode with no error and with the correct file name.
    I Googled the error I was getting and found KB211494.  It says I should uncheck the box in Options on the General tab that says "Ignore other applications", but this box is already unchecked in my case.  Any other ideas?  This is
    really frustrating as a small percentage of our company has upgraded to Office 2007 with the rest still on Office 2003.

    This may be a file association problem.  To solve that:
    In Windows 7:
    1. Right-click the file,
    2. Select "Open With" 
    select [Your Program Here]
    3. Check always use this program. 
    In Windows XP:
    1. Locate the file as you have described above
    2. Right click the file
    3. Select Open with from the pop-up menu
    4. Click Choose default program…
    5. Select Excel in the Recommended Programs box
    6. Check Always use the selected program to open this kind of file
    7. Click on OK.
    1.  Make Excel not available from Office 2007 listed under Programs and Features in Control Panel.
    2. Take a registry backup using the steps given here
    3. In the registry editor window expand HKEY_CLASSES_ROOT and navigate to .xls right and delete it.
    4. Exit Registry Editor
    5. Undo Step 1 to make Excel available.
    6.  Restart the computer and verify it the issue is fixed.
    If this answer solves your problem, please check Mark as Answered. If this answer helps, please click the Vote as Helpful button. Cheers, Shane Devenshire

  • Receiving multiple files with dual extension using file adapter

    Hi,
    The scenario where I am implementing requires multiple files of different names to be picked(ABC.txt) and dropped at destination(ABC.txt.pgp) up by my File Sender and Receiver adapters.  Any idea on about how the configuration for receiving multiple files with dual extension for receiver adapter is to be done?
    Note:- currently, The scenario is working fine without dual extension. i.e Its picking all files which starts with ABC and creating at destination as it is. even I configured as ABC.txt.pgp, but its not creating the second extension.
    Thanks in Advance
    Manmadha

    Hi,
    Try to concatenate '.pgp ' to the source file name to create the target file name for the receiver file adapter, by accessing the Adapter Specific Attributes using Java user defined function. This might work.
    Reference links:
    <a href="http://help.sap.com/saphelp_nw04/helpdata/en/43/03612cdecc6e76e10000000a422035/frameset.htm">SAP Help - Accessing Adapter Specific Attributes</a>
    <a href="/people/michal.krawczyk2/blog/2005/11/10/xi-the-same-filename-from-a-sender-to-a-receiver-file-adapter--sp14 - XI: The same filename from a sender to a receiver file adapter - SP14</a>
    Regards,
    S.Santhosh Kumar

Maybe you are looking for