How to print tree layout in Sun?

We are in the process of switching from a Sun box to a Windows 2003 box. I need to know how to print the tree layout in Sun so I can properly map paths and directories.
Thanks

Hello.
If you are looking for a command similar to "tree" in DOS/Windows: I do not know if there is an equivalent but I wrote a program to do this myself. The output is not very good yet.
#include <stdio.h>
#include <string.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <dirent.h>
void printtree(char *dname,int lvl,dev_t dev)
    struct stat st;
    struct dirent *dnt;
    static char buf[500];
    DIR *d;
    int i,l,m;
    l=strlen(dname);
    if(!dev)
        stat(dname,&st);
        dev=st.st_dev;
    d=opendir(dname);
    if(!d) return;
    dname[ l ]='/';
    while((dnt=readdir(d))!=NULL)
        if(strcmp(dnt->d_name,".") && strcmp(dnt->d_name,".."))
        m=0;
        strcpy(dname+l+1,dnt->d_name);
        lstat(dname,&st);
        if(S_ISLNK(st.st_mode))
            stat(dname,&st);
            if(S_ISDIR(st.st_mode)) m=1;
        else if(S_ISDIR(st.st_mode)) m=2;
        if(m)
            for(i=0;i<lvl;i++) printf("|   ");
            printf("+ %s",dnt->d_name);
            if(m==1)
                i=readlink(dname,buf,sizeof(buf)-1);
                if(i<0) printf(" <unknown symlink>");
                else
                    buf[ i ]=0;
                    printf(" <symlink to %s>\n",buf);
            else if(st.st_dev!=dev)
                printf(" <mount point>\n");
            else
                printf("\n");
                printtree(dname,lvl+1,dev);
    closedir(d);
    dname[ l ]=0;
main(int argc,char **argv)
    static char a[500];
    strcpy(a,(argc>1)?(argv[1]):".");
    printtree(a,0,0);
    return 0;
}I hope this helps.
Martin

Similar Messages

  • How to Print 2 layouts in One Page

    Hi Experts!
    As a customer requirement, I defined an half page Invoice Layout but when I printing it, it gets the hole page to print it.
    What the customer needs is to print 2 invoices in only one page. It is possible to do that?
    Advice me please!!
    Thanks
    Claudia P. Gutiérrez

    Hi,
    I think it's more of a printer setting, but probably it's not possible to set a normal laser printer to do this but could be possible with a dot matrix printer.
    Anyway, you could try to change the printer settings and the page settings from SAP, for example changing the paper size and then changing how many pages to print on one page - this setting usually offers printing two pages on one paper next to each other only but not below each other, but it's worth to give a try.
    Regards,
    Nat

  • How to print two layouts in one take

    Hi, we are printing our employee cards with custom layouts created in the human resources module. We created 2 layouts, one for the front of the card and one for the back. Right now, we print one side and then we need to change the default layout to print the back side.. Is there an easier way to do this? Maybe configure it so automatically prints the back side layout after the front side?
    Thanks!
    Jose.

    Jose,
    From what I know I don't think triggering print of a PLD is possible even using SDK as this is not exposed. you might want to check this in the SDK forum to be sure.
    Suda

  • How to print Photo layouts and Collages with Photoshop CS4?

    Hello all,
    I just downloaded PhotoShop CS4 trial version and comparing it to Photoshop Elements 6. I noticed that there are no ways to print photo packages nor photo collages in CS4 ! The only thing CS4 can do is to print one photo at the time. Adobe Bridge only allows to output PDF photo layouts without any control on the output.
    Can somebody let me know if i need to purchase an Adobe Photoshop CS4 add-on package to be able to print photo packages/layouts and also create collages, or i have to stick with Elements 6 ?
    Many thanks for your support !
    Sam
    Québec City

    Dear Bob,
    Many thanks for the reply !
    I have searched all over the Photoshop forums and never found anything about creating collage in CS4 !
    I have contacted Adobe in the last two evenings and the only thing they done were to transfer me back and forth between the Sales and service department and nobody were able to help me out.
    This is not a very good image they are projecting !
    I am a photograph and a very big PhotoShop Elements user, i downloaded the trail version of CS4, apart from a few added features, i have to say that PE does most of the work i need.
    But i still need to convince myself if i want to jump in the CS4 world !
    The only stopper for me at the moment, is printing and collage and CS4 seems to be lacking these features.
    Instead of directing me to the forum, would you know the direct answers to the following questions:
    1- Can i produce JPG format photo collages with CS4?
    2- Can i print photo packages / layouts with CS4 ?
    Or
    3- Do i need to purchase an add-on software package ?
    The Adobe Bridge ''output'' menu that comes with CS4 is well done, but you only can make PDF or XML files and you don't have any control on the composition: totally useless for me !
    Thanks Bob for your feedback !
    If i need to purchase an additional package, i'm removing CS4 from my computer and keeping PhotoShop Elements !
    With kind regards,
    Sam

  • How to Print two layouts into one page

    Hi,
    I have developed a report by blocked ALV.In this report i have created two blocks.
    But when i give print out the two blocks are not printing continuously.It is displaying one block in one page and another block in anther page.
    And i need page number at end of each page.
    Please provide me solution for this.
    Thanks & Regards
    Venkatrami Reddy B

    OOPS – OO ABAP
    http://esnips.com/doc/5c65b0dd-eddf-4512-8e32-ecd26735f0f2/prefinalppt.ppt
    http://esnips.com/doc/2c76dc57-e74a-4539-a20e-29383317e804/OO-abap.pdf
    http://esnips.com/doc/0ef39d4b-586a-4637-abbb-e4f69d2d9307/SAP-CONTROLS-WORKSHOP.pdf
    http://esnips.com/doc/92be4457-1b6e-4061-92e5-8e4b3a6e3239/Object-Oriented-ABAP.ppt
    http://esnips.com/doc/448e8302-68b1-4046-9fef-8fa8808caee0/abap-objects-by-helen.pdf
    http://esnips.com/doc/39fdc647-1aed-4b40-a476-4d3042b6ec28/class_builder.ppt
    http://www.amazon.com/gp/explorer/0201750805/2/ref=pd_lpo_ase/102-9378020-8749710?ie=UTF8
    http://help.sap.com/saphelp_nw04/helpdata/en/c3/225b5654f411d194a60000e8353423/content.htm
    http://help.sap.com/saphelp_nw2004s/helpdata/en/c3/225b5654f411d194a60000e8353423/content.htm
    Reports
    http://www.sapgenie.com/abap/reports.htm
    http://www.allsaplinks.com/material.html
    http://www.sapdevelopment.co.uk/reporting/reportinghome.htm
    http://www.sapfans.com/forums/viewtopic.php?t=58286
    http://www.sapfans.com/forums/viewtopic.php?t=76490
    http://www.sapfans.com/forums/viewtopic.php?t=20591
    http://www.sapfans.com/forums/viewtopic.php?t=66305 - this one discusses which way should you use - ABAP Objects calls or simple function modules.
    Rewards if useful.........
    Minal

  • How to print same layout twice changing only one field dynamically

    I have a report which prints three pages invoice in Dollar currency, I want that same report to print those three pages again but the currency will be changed dynamically based on certain criteria. It means I three pages for Dollar and next three pages for other currency.
    Or if you can help me printing the same report twice(do not want # of copies to be set to 2).
    Please it's urgent.
    Thanks
    Kailash.

    Hi
    Distribution.
    and the pass different currency in distribution.
    Regards
    chaluve

  • How to print a empty page in a Layout

    Hi experts,
    i have a small requirement in forms. In my sapscript form i have 2 pages. its displaying properly the invoice layout.
    But the new requirement is the user want to print a empty page as 1st page and remaining as per now current setting.
    How to print a empty first page in a layout using sapscript?
    Anyone help this issue?
    Mohaha

    Hi Mohana,
                    Create one new page and one window of almost page size with no contents.  Move that window to this page.  Keep this page as first page and give earlier first page as next page to this newly created page.
                    Hope this should solve the problem.
    Regards
    Sravan

  • How to print pageno ex: 1/10, 2/10.... in layouts

    hi guys,
    how to print the page no in layout?please provide solution..
    examle: 1/10, 2/10...

    Hi,
    Is it for a simple report? Or for a Smartform?.
    For <b>Report</b> you can write system variable in a event
    TOP OF PAGE :
    sy-pagno
    to see current page number and function DISPLAY_PAGENUMBER  to count total pages using
    lines.
    While for <b>Smartform</b> :
    You can write in a text element
    PAGE &sfsy-page&  OF &sfsy-formpages(4ZCR)& 
    ( so you'll see PAGE 1 OF 10 for ex.)

  • Tree component in Sun Studio Creator

    Hello.
    I have a problem with Tree component in Sun Java Studio Creator when i use it.
    Error:
    com.sun.rave.web.ui.appbase.ApplicationException: org.apache.jasper.JasperException: java.net.MalformedURLException: no protocol: /layout/layout.dtd
    Please, tell me, how to use this component?
    Thank you.

    java.net.MalformedURLException: no protocol:
    /layout/layout.dtdDid you ever bother to read the error message? It tells you what's wrong, and it tells you how to fix it.
    "/layout/layout.dtd" is not a valid URL. Fix that.

  • How to print a HTML file in browser look using DocPrintJob

    Hello guys,
    Does anyone know how to print HTML output/file into browser look?
    I'm using DocPrintJob and the DocFlavor set to DocFlavor.INPUT_STREAM.AUTOSENSE.
    posted below is my code :
    public class BasicPrint {
        public static void main(String[] args) {
            try {
                // Open the image file
                String testData = "C:/new_page_1.html";
                InputStream is = new BufferedInputStream(new FileInputStream(testData));
                DocFlavor flavor =  DocFlavor.INPUT_STREAM.AUTOSENSE;
                // Find the default service
                PrintService service = PrintServiceLookup.lookupDefaultPrintService();
                System.out.println(service);
                // Create the print job
                DocPrintJob job = service.createPrintJob();
                Doc doc= new SimpleDoc(is, flavor, null);
                // Monitor print job events; for the implementation of PrintJobWatcher,
                // see e702 Determining When a Print Job Has Finished
                PrintJobWatcher pjDone = new PrintJobWatcher(job);
                // Print it
                job.print(doc, null);
                // Wait for the print job to be done
                pjDone.waitForDone();
                // It is now safe to close the input stream
                is.close();
            } catch (PrintException e) {
                e.printStackTrace();
            } catch (IOException e) {
                e.printStackTrace();
        static class PrintJobWatcher {
            // true iff it is safe to close the print job's input stream
            boolean done = false;
            PrintJobWatcher(DocPrintJob job) {
                // Add a listener to the print job
                job.addPrintJobListener(new PrintJobAdapter() {
                    public void printJobCanceled(PrintJobEvent pje) {
                        allDone();
                    public void printJobCompleted(PrintJobEvent pje) {
                        allDone();
                    public void printJobFailed(PrintJobEvent pje) {
                        allDone();
                    public void printJobNoMoreEvents(PrintJobEvent pje) {
                        allDone();
                    void allDone() {
                        synchronized (PrintJobWatcher.this) {
                            done = true;
                            PrintJobWatcher.this.notify();
            public synchronized void waitForDone() {
                try {
                    while (!done) {
                        wait();
                } catch (InterruptedException e) {
    }the printed ouput for this code will be look like this
    <html>
    <body>
    <div style="page-break-after:'always';
                background-color:#EEEEEE;
                width:400;
                height:70">
         testPrint</div>
    ABCDEFGHIJK<p>
     </p>
    </body>
    </html>however, the output that i want is the HTML in browser look not HTML code itself.
    i've tried to change the DocFlavor into any TEXT_HTML type but it gives error:
    sun.print.PrintJobFlavorException: invalid flavor if you guys has any idea or solution, can you share with me... already search in Google but still not found any solution
    Thanks in advanced.

    hi,
    do the following
    URL url = null;
    try
         url = new URL("http://www.xyz.com");
    catch (MalformedURLException e)
          System.out.println("URL not correct " + e.toString());
    if (url != null)
           getAppletContext().showDocument(url,"_blank"); //shows the page in a new unnamed top level browser instance.
    }hope that helpz
    cheerz
    ynkrish

  • How to print last page in sap script in ladscape format?

    Hi all,
    can any 1 tell me How to print last page in sap script in ladscape format?
    Thanks In advance.
    Pravin

    Hi Pravin Sherkar,
    we can do this in SAP Scripts.
    we need to create two pages, one of landscape and another of potrait.
    now after filling the data at last we need to call the page which is of format landscape using START_FORM  function module.
    You can use condition &PAGE& = &FORMPAGES&.
    Please check this link
    Printing Portrait/Landscape in sapscript
    Re: Landscape and potrait in same layout?
    http://www.sap-img.com/ts013.htm
    Best regards,
    raam

  • How to print page numbers in adobe form

    Hi,
    Can anybody tell me how to print page numbers in adobe form.
    Thanks in advance
    Chaitanya

    Hi,
    Yes the field page n of m is used normally for printing page numbers. But it won't display the current page of total pages by itself. You have to set the run time property to n (current page ) and m (Total number of pages). Carefully select the # (current page ) and ## (Total number of pages). Hope this works for you.
    My requirement is to have the user control on current page. For Example:
    Example for a Invoice with 5 PO items (stands on 2 pages) :
    1st  page is the letter : no page number
    2nd page is the 1st page of the 1st copy of the invoice : we should read u201C1 / 2u201D
    3rd page is the 2nd page of the 1st copy of the invoice : we should read u201C2 / 2u201D
    4th page is the 1st page of the 2nd copy of the invoice : we should read u201C1 / 2u201D
    5th page is the 2nd page of the 2nd copy of the invoice : we should read u201C2 / 2u201D
    Presently i cam getting the current page number for page 4th as 3 / 2 and for 5th page 4 / 2. I could able to control the total number of pages from print program. But when i am printing the second copy (4th and 5th pages), I couldn't able to control the current page number. I need to initialize the Current page count (4th page ) as 1.
    I have used the follwing java scripting:
    this.rawValue = wv_pages - xfa.layout.page(this)
    where wv_pages is total no of pages calculated from print program.
    Please help me in this regard with some formcal or java scripting conditions.
    Thank You,
    Regards,
    Naresh.

  • How to print a report in half of the A4 page

    Hi,
    Please help me, how to print a report in the half page of the A4 size paper.
    Thanks,

    Hi
    If you are using the command MEW-PAGE PRINT ON
    then we can give this layout options
    like
    NEW-PAGE PRINT ON
    DESTINATION <printer name>
    immediately 'X'
    KEEP IN SPOOL 'X'
    LAYOUT 'X_65_132'  (OR X_65_255)
    RECEIVER SY-UNAME
    NO-DISPLAY.
    OTHERWISE WHEN YOU SELECT THE PRINTER
    IN THE PRINTER PROPERTIES/SETTINGS BASICS-> PAPER
    you will have this facility to select LANGSCAPE/PORTRAIT
    use that and print
    Reward points for useful Answers
    Regards
    Anji

  • How to print Data Model in Report??

    Do anyone know how to print Data Model??
    Thanks your help.
    - Frank

    Hi Venkat,
    Thanks alot.... i am checking the appendix k.
    I want to know that if i want to customize the report as per the client requirement,
    can you please let me know which template i will use if i required remittence advice as well as check print data on the layout.
    The following is the list of field i required:
    Vendor ID
    Check Date
    Check number
    invoice date
    invoice/ CR memo number
    invoice description
    invoice gross amount
    invoice discount amount
    invoice net amount
    total gross amount
    total discount amount
    total net amount
    logo
    company name and info
    bank name and info
    check number
    check amount spelled out
    check date
    check amount numeric
    payee name
    CEO signature
    MICR check number
    MICR routing number
    MICR bank account number
    mailing return address
    mailing address
    Venkat it would be great help if you please let me know the exact process to be follow for check printing report.
    I worked on bi publisher report in 11i, but in 12i the process is bit different.
    also if you have any template ready can you please send me on my mail id ... i forwarded you the test mail from my official id or on [email protected]
    Looking forward to your kind response.
    Regards
    Ratnesh

  • How to print text on container using oop on alv list

    Hello Guru's,
             pl guide me how to print text on container using alv list-display which have interactive events  using     oop classes/methods ...
                    I want to print hard coded text on coantainer , on double clicking it will call another screen.
    Pl Help..
    Message was edited by:
            paresh sonavane

    Hi Paresh,
           1.      Go to the Layout and Create One custom container box and give name it.
            2. Custom Container is the one type of tool and its used for Displaying the Reports 
                with the use of ABAP Objects.
            3. Go to se38 and Write The Following Code.
    tables ZTEAM_GD.
    DATA : OBJ TYPE REF TO CL_GUI_CUSTOM_CONTAINER,
           OBJ1 TYPE REF TO CL_GUI_ALV_GRID.
    DATA IT_TEAM LIKE TABLE OF ZPLAYER_BAT_DET       .
    SELECT * FROM ZPLAYER_BAT_DET INTO TABLE IT_TEAM.
    CREATE OBJECT OBJ
      EXPORTING
        CONTAINER_NAME              = 'ALV'.          -
    > Give ur Container Name
    CREATE OBJECT OBJ1
      EXPORTING
        I_PARENT          = OBJ.
    CALL METHOD OBJ1->SET_TABLE_FOR_FIRST_DISPLAY
      EXPORTING
        I_STRUCTURE_NAME              = 'ZPLAYER_BAT_DET'
      CHANGING
        IT_OUTTAB                     = IT_TEAM.
    *CALL METHOD OBJ1->SET_DROP_DOWN_TABLE
    EXPORTING
       I_STRUCTURE_NAME = 'ZTEAM_GD'
    CHANGING
       IT_OUTTAB        = IT_TEAM.
    CALL SCREEN 9000.
    *&      Module  USER_COMMAND_9000  INPUT
          text
    MODULE USER_COMMAND_9000 INPUT.
    CASE SY-UCOMM.
    WHEN 'EXT'.
      LEAVE PROGRAM.
    ENDCASE.
    ENDMODULE.                 " USER_COMMAND_9000  INPU     
    Thanks.
    Reward If Helpful.

Maybe you are looking for