CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Page 1 of 2 12 LastLast
Results 1 to 15 of 17
  1. #1
    Join Date
    Apr 2011
    Posts
    23

    Output to txt document

    NOTE THIS QUESTION NO LONGER APPLYS PLEASE READ POST #15 but

    I will keep this here because the answer is given for this and it may be useful to someone else


    Need a bit of help I want to work on my second project but don't know where to start exactly...

    What I want it to do is grab all the files in a specified directory then output all of the names of the files on to a text document.

    But I want three lines of text and it needs to go in a key spot.

    xxxxxxxxxxxxxxxxxxxxxxxxxxxx (NAME OF FILE) xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
    (NAME OF FILE) xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
    xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx(NAME OF FILE)

    I would like for every file in the folder to basically get put where it says name of file for each instance. So for each instance it spits out all of the same text except for the name of the file is changed to match the complete file name.

    Thanks a million guys for any help in advance.
    Last edited by infringer; September 11th, 2011 at 01:21 PM.

  2. #2
    Join Date
    Jul 2008
    Location
    WV
    Posts
    5,362

    Re: Output to txt document

    I would use a for each loop to get all the filenames, append/prepend characters as needed, use writeline to write the data to the output file.
    Always use [code][/code] tags when posting code.

  3. #3
    Join Date
    Feb 2011
    Location
    United States
    Posts
    1,016

    Re: Output to txt document

    You'll also find it helpful to make use of the DirectoryInfo and FileInfo classes. Take note of DirectoryInfo.GetFiles(), specifically.

    Clear enough? Shouldn't be too difficult...

    Good luck!
    Best Regards,

    BioPhysEngr
    http://blog.biophysengr.net
    --
    All advice is offered in good faith only. You are ultimately responsible for effects of your programs and the integrity of the machines they run on.

  4. #4
    Join Date
    Apr 2011
    Posts
    23

    Re: Output to txt document

    Post edited direction shift in app
    Last edited by infringer; September 11th, 2011 at 01:19 PM. Reason: direction shift in app

  5. #5
    Join Date
    Apr 2011
    Posts
    23

    Re: Output to txt document

    REMOVED differnt direction for post
    Last edited by infringer; September 11th, 2011 at 01:21 PM. Reason: Differnt Direction for app

  6. #6
    Join Date
    Apr 2011
    Posts
    23

    Re: Output to txt document

    REMOVED different direction for app
    Last edited by infringer; September 11th, 2011 at 01:22 PM. Reason: different direction for app

  7. #7
    Join Date
    Apr 2011
    Posts
    23

    Re: Output to txt document

    refer to post #15
    Last edited by infringer; September 11th, 2011 at 01:25 PM. Reason: different direction for app

  8. #8
    Join Date
    Jul 2008
    Location
    WV
    Posts
    5,362

    Re: Output to txt document

    GetFiles(.iso) would result in an error. You also need to use a wildcard to list all files of a given type

    e.g.

    GetFiles("*.iso")

    To get all the files use something like you have above but rather than getdirectories use getfiles in your for each loop.

    Not sure what you are talking about with the replace. Sounded like you wanted to create a text file that lists all the filenames in a given folder, to do this you would create a new file and write the names to it as you go. Of course you could store them all in a var that you keep appending to until all have been read then write all the data at once.

    As for programing being easy, Well it has gotten a lot easier over the years with more and more canned routines and classes as well as tons of samples on the net. Still many would find it difficult and most who would think it easy haven't gotten very far yet.


    btw the streamwriter which you might use to write to the file allows a parameter for what to do if a file already exists, Append or overwrite are your options. In your case you would simply want to choose to overwrite.
    Last edited by DataMiser; September 8th, 2011 at 09:10 PM.
    Always use [code][/code] tags when posting code.

  9. #9
    Join Date
    Apr 2011
    Posts
    23

    Re: Output to txt document

    Removed improper code different direction for app
    Last edited by infringer; September 11th, 2011 at 01:24 PM. Reason: different direction for app

  10. #10
    Join Date
    Feb 2011
    Location
    United States
    Posts
    1,016

    Re: Output to txt document

    By the way, infringer, you can make your code look nicer by surrounding it with [code] and [/code] tags to get something that preserves formatting like:

    Code:
    static void Main(string[] args)
    {
        // Get the directories currently on the C drive.
        DirectoryInfo[] cDirs = new DirectoryInfo(@"c:\").GetDirectories();
    
        // Write each directory name to a file.
        using (StreamWriter sw = new StreamWriter("CDriveDirs.txt"))
        {
            foreach (DirectoryInfo dir in cDirs)
            {
                sw.WriteLine(dir.Name);
            }
        }
    
        // Read and show each line from the file.
        string line = "";
        using (StreamReader sr = new StreamReader("CDriveDirs.txt"))
        {
            while ((line = sr.ReadLine()) != null)
            {
                Console.WriteLine(line);
            }
        }
    }
    Best Regards,

    BioPhysEngr
    http://blog.biophysengr.net
    --
    All advice is offered in good faith only. You are ultimately responsible for effects of your programs and the integrity of the machines they run on.

  11. #11
    Join Date
    Apr 2011
    Posts
    23

    Re: Output to txt document

    This post was edited because change of direction
    Last edited by infringer; September 11th, 2011 at 01:18 PM. Reason: direction shift

  12. #12
    Join Date
    Feb 2011
    Location
    United States
    Posts
    1,016

    Re: Output to txt document

    Quote Originally Posted by infringer View Post
    Hrmmm there is a couple of spots I am not so sure of like if the array will be strings which I can retrieve with my for each statement... Must keep researching this is too awesome should not take that long and I should be on my way to start throwing some code into VS.
    Okay; looks like you're on the right track. Good work. Let us know if you have any problems.
    Best Regards,

    BioPhysEngr
    http://blog.biophysengr.net
    --
    All advice is offered in good faith only. You are ultimately responsible for effects of your programs and the integrity of the machines they run on.

  13. #13
    Join Date
    Apr 2011
    Posts
    23

    Re: Output to txt document

    Refer to POST #15 as start of thread
    Last edited by infringer; September 11th, 2011 at 01:25 PM. Reason: POST # 15 as start of thread

  14. #14
    Join Date
    Feb 2011
    Location
    United States
    Posts
    1,016

    Re: Output to txt document

    Hrm? I guess I am confused about what is confusing you. This is the solution I would have used:

    Code:
    public static void Main(string[] args)
    {
        //Write all files of type *.iso in somefolder to output.txt
        writeFileNames(@"C:\SomeFolder", "output.txt", "*.iso");
    }
    
    
    public static void writeFileNames(string directoryPath, string outputTextPath, string fileTypeMask)
    {
        //Open a writer 
        StreamWriter writer = new StreamWriter(outputTextPath);
        
        DirectoryInfo dirInfo = new DirectoryInfo(directoryPath);
        FileInfo[] files = dirInfo.GetFiles(fileTypeMask);
        
        //Iterate through the files
        foreach(FileInfo file in files)
        {
            writer.WriteLine("Line one with file name " + file.Name + " some other text");
            writer.WriteLine("Line two with file name and full path " + file.FullName + " some other text");
        }
        
        //We're done writing output for now
        writer.Close();
        write.Dispose();
        
        //Do you want to inclue subdirectories?  If so, recursively call this subroutine on them
        DirectoryInfo[] subdirs = dirInfo.GetDirectories();
        foreach(DirectoryInfo subdir in subdirs)
        {
            //Recursive call to this method: note it's important we closed the writer before this call
            writeFileNames(subdir.FullPath, outputTextPath, fileTypMask);
        }    
    }
    Does that help? Did I miss your question?

    Note that the recursive call to subdirectories has a risk of encountering a directory you don't have security access to, throwing a SecurityException when it encounters dirInfo.GetFiles(...). You can catch this by wrapping this call wit a try-catch block, but that is probably too much detail for now.

    Hopefully this wasn't homework. Sometimes it's just easiest to explain by example though. If it WAS homework, don't study the solution too closely: try to derive it yourself - it's more educational that way.
    Best Regards,

    BioPhysEngr
    http://blog.biophysengr.net
    --
    All advice is offered in good faith only. You are ultimately responsible for effects of your programs and the integrity of the machines they run on.

  15. #15
    Join Date
    Apr 2011
    Posts
    23

    Re: Output to txt document

    No sir it is not homework at all to tell you the truth I am trying to donate some time to help improve a great free program and the intentions are 100% good ...

    The maker of a good syslinux tool called SARDU.

    The problem it appears without looking into it is a bit more complex...

    I kinda kicked some ideas around that would make the program better but the developer seems to be overwhelmed and needed help so I set out to help him out with a very limited knowledge of programming...

    The idea is to learn from example in this situation once I understand a method for completion of a task I can use that method and expand on it and from it there is a lot of little parts and pieces that are not fully understood...

    Here is a cut and paste from what I figured out and how to support this it will be a bit different then what I had figured cause the autogeneration will not work the way I had visioned it due to the fact there is different options that much be used for each ISO.

    CUT AND PASTE STARTS NOW::::::::::::::::::::::::::::::::::::::::::::::::

    Re: New features Req: Lets Make this a great application

    Postby infringer » Today, 7:48 am
    Objectives:

    - Create a skeleton file with all config info on it skeleton.txt
    - Get all file names of the iso file type in the current directory store them in a text file currentiso.txt
    - Create a text file with iso's that are supported in this thread viewtopic.php?f=2&t=252 supportediso.txt
    - Create a seperate config texts for each supported iso Example ubuntu10.1.iso.txt
    - If there is a match then add the text from the corresponding ISO.txt to the skeleton.txt and keep adding all matches till finished
    - Save skeleton.txt as extra.cfg
    - Then Exit Gracefully with everything automated

    Now if coding were as easy as english I would be done! lol!

    If anyone has any suggestions to make this easier go right ahead....

    I wonder if I could make 3 arrays lets say currentiso and supportediso and equaliso

    Then I could check each supportediso array each string keeping it static and compare with currentiso array if they are equal I could add them to equal iso array.
    Once equaliso array is built then I could load each string from equal iso + iso.txt and add the information from this file to skeleton.txt then save it.

    It may be easier to use mysql or MS SQL to do this???

    I need some suggestions here on the easiest way to accomplish what I would like to do here or what is possible in C#

    Please do help me get started down some preferred path and give me some good reasons why to follow that path.

    Thanks -infringer-

    STATUS OF SARDUX objectives now started


    Now as for an example of the supported ISO's so you can see the differences in the way the text has to be added to the extra.cfg

    extra.cfg included below some notes about extra.cfg first
    "#" comments a line of text out
    all extras added must be included between two lines in the text

    #-> EDIT HERE <-
    This is where we add the data
    #-> EDIT HERE <-
    START OF extra.cfg
    Code:
    #	Don't change or delete the following lines
    #File creato da Shardana Antivirus Rescue Disk Utility 'SARDU'
    default vesamenu.c32
    prompt 0
    menu title     Shardana Antivirus Rescue Disk Utility
    MENU SEPARATOR
    menu background sardu.jpg
    MENU TABMSG  http://www.sarducd.it
    menu color hotsel 30;47      #40000000 #20ffffff
    menu color sel 30;47      #40000000 #20ffffff
    menu color scrollbar 30;47      #40000000 #20ffffff
    menu color help		37;40      #c0ffffff #00000000 std
    MENU WIDTH 74
    MENU MARGIN 15
    #MENU PASSWORDMARGIN 3
    MENU ROWS 15
    MENU TABMSGROW -10
    MENU CMDLINEROW 23
    MENU ENDROW -1
    #MENU PASSWORDROW 11
    MENU TIMEOUTROW -8
    #
    LABEL -
    MENU LABEL Extra:
    MENU DISABLE
    #	Don't change or delete the above lines
    #examples here: http://members.chello.at/bobby100/ILpart1.htm
    #-----> ENTER YOUR CODE AFTER THIS LINE    don't leave blank lines <-------
    #
    #-> EDIT HERE <-
    #-> EDIT HERE <-
    #
    #	Don't change or delete the following lines
    #
    #boot torna indietro
    label <==Back
    kernel vesamenu.c32
        APPEND /syslinux.cfg
    #
    #	Don't change or delete the above lines
    Now as for the supported ISO's I will include the list of them to show you why I will have to automate in a manner following some of the objectives that I have changed I still do not know if I have the best way to automate that is why I need the help of GURU's like yourself and a very limited knowledge of C# does not help as well.

    I will have to specify that names of ISO's need to be renamed to match a particular ISO so that people do not use things like ubuntu_laptop_For_George.iso so people will have to change the name I would guess that one could automate this process as well with MD5 checks but when you get into slightly modified ISO's MD5 hashes will not work even though the ISO is basically the same and should work. So I guess another way to automate the rename would be to scan the name of the ISO for key numbers or letters like a version number 10.1 and a bit based 64bit or 32bit or x86 and x64 along with the base name such as
    ubuntu then that way if someone renamed the ISO to Ubuntu_10.1_Netbook_Edition_Georgex_x86.iso it could be changed to a name that fits the descriptor needed. But I think it is best that we give people responsibility of naming ISO's properly to match the supported listing because someone could have a good ISO lets say and abbreviate it as well UNE10.1x64.iso meaning ubuntu_netbook_edition_10.1_x64.iso so the problem could get very ugly and not manageable.

    List of supported ISO's information STARTS HERE:::::
    Code:
    title Ubuntu 10.10 (GNOME Desktop x86)
    find --set-root /ubuntu-10.10-desktop-i386.iso
    map /ubuntu-10.10-desktop-i386.iso (0xff)
    map --hook
    root (0xff)
    kernel /casper/vmlinuz file=/cdrom/preseed/ubuntu.seed boot=casper persistent iso-scan/filename=/ubuntu-10.10-desktop-i386.iso splash
    initrd /casper/initrd.lz
    
    title Xubuntu 10.10 (XFCE Desktop x86)
    find --set-root /xubuntu-10.10-desktop-i386.iso
    map /xubuntu-10.10-desktop-i386.iso (0xff)
    map --hook
    root (0xff)
    kernel /casper/vmlinuz file=/cdrom/preseed/xubuntu.seed boot=casper persistent iso-scan/filename=/xubuntu-10.10-desktop-i386.iso floppy.allowed_drive_mask=0 splash
    initrd /casper/initrd.lz
    
    title Kubuntu 10.10 (KDE Desktop x86)
    find --set-root /kubuntu-10.10-desktop-i386.iso
    map /kubuntu-10.10-desktop-i386.iso (0xff)
    map --hook
    root (0xff)
    kernel /casper/vmlinuz file=/cdrom/preseed/kubuntu.seed boot=casper persistent iso-scan/filename=/kubuntu-10.10-desktop-i386.iso floppy.allowed_drive_mask=0 splash
    initrd /casper/initrd.lz
    
    title Kubuntu 10.10 (KDE Desktop x86)
    find --set-root /kubuntu-10.10-desktop-i386.iso
    map /kubuntu-10.10-desktop-i386.iso (0xff)
    map --hook
    root (0xff)
    kernel /casper/vmlinuz file=/cdrom/preseed/kubuntu.seed boot=casper persistent iso-scan/filename=/kubuntu-10.10-desktop-i386.iso floppy.allowed_drive_mask=0 splash
    initrd /casper/initrd.lz
    
    # Suggested by Ambriel
    title Lubuntu 10.10 (LXDE Lightweight Desktop x86)
    find --set-root /lubuntu-10.10.iso
    map /lubuntu-10.10.iso (0xff)
    map --hook
    root (0xff)
    kernel /casper/vmlinuz file=/cdrom/preseed/lubuntu.seed boot=casper persistent iso-scan/filename=/lubuntu-10.10.iso floppy.allowed_drive_mask=0 splash
    initrd /casper/initrd.lz
    
    title Ubuntu 10.10 Netbook Remix (NetBook Distro)
    find --set-root /ubuntu-10.10-netbook-i386.iso
    map /ubuntu-10.10-netbook-i386.iso (0xff)
    map --hook
    root (0xff)
    kernel /casper/vmlinuz floppy.allowed_drive_mask=0 noprompt cdrom-detect/try-usb=true file=/cdrom/preseed/ubuntu-netbook.seed boot=casper persistent iso-scan/filename=/ubuntu-10.10-netbook-i386.iso splash
    initrd /casper/initrd.lz
    
    title Memtest86+
    find --set-root /mt410.iso
    map --mem /mt410.iso (hd32)
    map --hook
    root (hd32)
    chainloader (hd32)
    
    title Debian Live
    find --set-root /debian/live/initrd.img
    kernel /debian/live/vmlinuz boot=live union=aufs noswap live-media-path=/debian/live
    initrd /debian/live/initrd.img
    
    title Sugar on a Stick
    find --set-root /sos/isolinux/vmlinuz0
    kernel /sos/isolinux/vmlinuz0 root=live:LABEL=MULTIBOOT live_dir=sos/LiveOS rootfstype=vfat ro liveimg quiet rhgb rd_NO_LUKS rd_NO_MD
    initrd /sos/isolinux/initrd0.img
    
    # Suggested by Relst
    title Run a Linux OS from the Internet
    kernel /gpxe.lkrn
    
    title Balder DOS image (FreeDOS)
    find --set-root /balder10.img
    map --unsafe-boot /balder10.img (fd0)
    map --hook
    chainloader --force (fd0)+1
    rootnoverify (fd0)
    
    # Suggested by Martin Andersson
    title DBAN 2.2.6 (Drive Nuker)
    find --set-root /dban-2.2.6_i586.iso
    map --mem /dban-2.2.6_i586.iso (hd32)
    map --hook
    root (hd32)
    chainloader (hd32)
    
    # Suggested by Greg Steer
    title Offline NT Password & Registy Editor
    find --set-root /cd100627.iso
    map /cd100627.iso (hd32)
    map --hook
    chainloader (hd32)
    
    # Start Suggested by Erhan Sohail
    title TinyCore
    find --set-root /tinycore-current.iso
    map /tinycore-current.iso (0xff) || map --mem /tinycore-current.iso (0xff)
    map --hook
    chainloader (0xff)
    
    title SliTaz 3.0
    find --set-root /slitaz-3.0.iso
    map --heads=0 --sectors-per-track=0 /slitaz-3.0.iso (hd32)
    map --hook
    chainloader (hd32)
    
    title Puppy 511
    find --set-root /puppy/lupu-511.sfs
    kernel /puppy/vmlinuz
    initrd /puppy/initrd.gz
    
    title DSL 4.4.10
    find --set-root /dsl-4.4.10-initrd.iso
    map /dsl-4.4.10-initrd.iso (hd32)
    map --hook
    root (hd32)
    chainloader (hd32)
    
    title Riplinux
    find --set-root /RIPLinuX.iso
    map --heads=0 --sectors-per-track=0 /RIPLinuX.iso (0xff) || map --heads=0 --sectors-per-track=0 --mem /RIPLinuX.iso (0xff)
    map --hook
    chainloader (0xff)
    
    title Ultimate Boot CD
    find --set-root /ubcd.iso
    map /ubcd.iso (hd32)
    map --hook
    chainloader (hd32)
    
    title OphCrack XP 2.3.1 (XP Password Cracker)
    find --set-root /ophcrack-xp-livecd-2.3.1.iso
    map /ophcrack-xp-livecd-2.3.1.iso (0xff)
    map --hook
    root (0xff)
    kernel /boot/bzImage rw root=/dev/null vga=normal lang=C kmap=us screen=1024x768x16 autologin
    initrd /boot/rootfs.gz
    
    # Suggested by Sunny
    title YlmF (Windows Like OS)
    find --set-root /YlmF_OS_3.0.iso
    map /YlmF_OS_3.0.iso (0xff)
    map --hook
    root (0xff)
    kernel /casper/vmlinuz file=/cdrom/preseed/ubuntu.seed boot=casper persistent iso-scan/filename=/YlmF_OS_3.0.iso floppy.allowed_drive_mask=0 splash
    initrd /casper/initrd.img
    
    title Ubuntu Rescue Remix 10.04 (Recovery Tools)
    find --set-root /ubuntu-rescue-remix-10-04.iso
    map /ubuntu-rescue-remix-10-04.iso (0xff)
    map --hook
    root (0xff)
    kernel /casper/vmlinuz file=/cdrom/preseed/ubuntu.seed boot=casper iso-scan/filename=/ubuntu-rescue-remix-10-04.iso floppy.allowed_drive_mask=0 splash
    initrd /casper/initrd.lz
    
    title Ubuntu 10.10 (GNOME Desktop x86)
    find --set-root /ubuntu-10.10-desktop-i386.iso
    map /ubuntu-10.10-desktop-i386.iso (0xff)
    map --hook
    root (0xff)
    kernel /casper/vmlinuz file=/cdrom/preseed/ubuntu.seed boot=casper persistent iso-scan/filename=/ubuntu-10.10-desktop-i386.iso splash
    initrd /casper/initrd.lz
    
    title Xubuntu 10.10 (XFCE Desktop x86)
    find --set-root /xubuntu-10.10-desktop-i386.iso
    map /xubuntu-10.10-desktop-i386.iso (0xff)
    map --hook
    root (0xff)
    kernel /casper/vmlinuz file=/cdrom/preseed/xubuntu.seed boot=casper persistent iso-scan/filename=/xubuntu-10.10-desktop-i386.iso floppy.allowed_drive_mask=0 splash
    initrd /casper/initrd.lz
    
    title Kubuntu 10.10 (KDE Desktop x86)
    find --set-root /kubuntu-10.10-desktop-i386.iso
    map /kubuntu-10.10-desktop-i386.iso (0xff)
    map --hook
    root (0xff)
    kernel /casper/vmlinuz file=/cdrom/preseed/kubuntu.seed boot=casper persistent iso-scan/filename=/kubuntu-10.10-desktop-i386.iso floppy.allowed_drive_mask=0 splash
    initrd /casper/initrd.lz
    
    # Suggested by Ambriel
    title Lubuntu 10.10 (LXDE Lightweight Desktop x86)
    find --set-root /lubuntu-10.10.iso
    map /lubuntu-10.10.iso (0xff)
    map --hook
    root (0xff)
    kernel /casper/vmlinuz file=/cdrom/preseed/lubuntu.seed boot=casper persistent iso-scan/filename=/lubuntu-10.10.iso floppy.allowed_drive_mask=0 splash
    initrd /casper/initrd.lz
    
    title Ubuntu 10.10 Netbook Remix (NetBook Distro)
    find --set-root /ubuntu-10.10-netbook-i386.iso
    map /ubuntu-10.10-netbook-i386.iso (0xff)
    map --hook
    root (0xff)
    kernel /casper/vmlinuz floppy.allowed_drive_mask=0 noprompt cdrom-detect/try-usb=true file=/cdrom/preseed/ubuntu-netbook.seed boot=casper persistent iso-scan/filename=/ubuntu-10.10-netbook-i386.iso splash
    initrd /casper/initrd.lz
    
    title Ubuntu 10.04.1 (GNOME Desktop x86)
    find --set-root /ubuntu-10.04.1-desktop-i386.iso
    map /ubuntu-10.04.1-desktop-i386.iso (0xff)
    map --hook
    root (0xff)
    kernel /casper/vmlinuz file=/cdrom/preseed/ubuntu.seed boot=casper persistent iso-scan/filename=/ubuntu-10.04.1-desktop-i386.iso splash
    initrd /casper/initrd.lz
    
    title Xubuntu 10.04 (XFCE Desktop x86)
    find --set-root /xubuntu-10.04-desktop-i386.iso
    map /xubuntu-10.04-desktop-i386.iso (0xff)
    map --hook
    root (0xff)
    kernel /casper/vmlinuz file=/cdrom/preseed/xubuntu.seed boot=casper persistent iso-scan/filename=/xubuntu-10.04-desktop-i386.iso floppy.allowed_drive_mask=0 splash
    initrd /casper/initrd.lz
    
    title Kubuntu 10.04.1 (KDE Desktop x86)
    find --set-root /kubuntu-10.04.1-desktop-i386.iso
    map /kubuntu-10.04.1-desktop-i386.iso (0xff)
    map --hook
    root (0xff)
    kernel /casper/vmlinuz file=/cdrom/preseed/kubuntu.seed boot=casper persistent iso-scan/filename=/kubuntu-10.04.1-desktop-i386.iso floppy.allowed_drive_mask=0 splash
    initrd /casper/initrd.lz
    
    # Suggested by Ambriel
    title Lubuntu 10.04 (LXDE Lightweight Desktop x86)
    find --set-root /lubuntu-10.04.iso
    map /lubuntu-10.04.iso (0xff)
    map --hook
    root (0xff)
    kernel /casper/vmlinuz file=/cdrom/preseed/lubuntu.seed boot=casper persistent iso-scan/filename=/lubuntu-10.04.iso floppy.allowed_drive_mask=0 splash
    initrd /casper/initrd.lz
    
    title Linux Mint 9
    find --set-root /linuxmint-9-gnome-cd-i386.iso
    map /linuxmint-9-gnome-cd-i386.iso (0xff)
    map --hook
    root (0xff)
    kernel /casper/vmlinuz file=/cdrom/preseed/mint.seed boot=casper persistent iso-scan/filename=/linuxmint-9-gnome-cd-i386.iso floppy.allowed_drive_mask=0 splash
    initrd /casper/initrd.lz
    
    title Peppermint Linux
    find --set-root /Peppermint-One-06172010.iso
    map /Peppermint-One-06172010.iso (0xff)
    map --hook
    root (0xff)
    kernel /casper/vmlinuz file=/cdrom/preseed/mint.seed boot=casper persistent iso-scan/filename=/Peppermint-One-06172010.iso splash
    initrd /casper/initrd.lz
    
    title Ubuntu 10.04 Netbook Remix (NetBook Distro)
    find --set-root /ubuntu-10.04-netbook-i386.iso
    map /ubuntu-10.04-netbook-i386.iso (0xff)
    map --hook
    root (0xff)
    kernel /casper/vmlinuz floppy.allowed_drive_mask=0 noprompt cdrom-detect/try-usb=true file=/cdrom/preseed/ubuntu-netbook.seed boot=casper persistent iso-scan/filename=/ubuntu-10.04-netbook-i386.iso splash
    initrd /casper/initrd.lz
    
    title EasyPeasy 1.6 (NetBook Distro)
    find --set-root /EasyPeasy-1.6.iso
    map /EasyPeasy-1.6.iso (0xff)
    map --hook
    root (0xff)
    kernel /casper/vmlinuz floppy.allowed_drive_mask=0 noprompt cdrom-detect/try-usb=true file=/cdrom/preseed/ubuntu-netbook.seed boot=casper persistent iso-scan/filename=/EasyPeasy-1.6.iso splash
    initrd /casper/initrd.lz
    
    # Suggested by Mario
    title Eeebuntu 3.0.1 Netbook Remix (NetBook Distro)
    find --set-root /eeebuntu-3.0.1-nbr.iso
    map /eeebuntu-3.0.1-nbr.iso (0xff)
    map --hook
    root (0xff)
    kernel /casper/vmlinuz noprompt cdrom-detect/try-usb=true file=/cdrom/preseed/ubuntu.seed boot=casper persistent iso-scan/filename=/eeebuntu-3.0.1-nbr.iso splash
    initrd /casper/initrd.gz
    
    # Suggested by Robin McGough
    title xPUD 0.9.2 (NetBook Distro)
    find --set-root --ignore-floppies --ignore-cd /xpud-0.9.2.iso
    map --heads=0 --sectors-per-track=0 /xpud-0.9.2.iso (hd32)
    map --hook
    chainloader (hd32)
    
    # Suggested by Michel Jank
    title Slax 6.1.2 Graphics mode (KDE)
    find --set-root /Slax612/boot/initrd.gz
    kernel /Slax612/boot/vmlinuz initrd=/boot/initrd.gz ramdisk_size=6666 root=/dev/ram0 rw autoexec=xconf;telinit~4 changes=/Slax612
    initrd /Slax612/boot/initrd.gz
    
    title Parted Magic 5.4 (Partition Tools)
    find --set-root /pmagic-5.4.iso
    map /pmagic-5.4.iso (hd32)
    map --hook
    root (hd32)
    chainloader (hd32)
    
    title Boot gparted (Partition Tools)
    find --set-root /gparted/live/initrd.img
    kernel /gparted/live/vmlinuz live-media-path=gparted/live boot=live i915.modeset=0 xforcevesa radeon.modeset=0 noswap nomodeset noprompt vga=788 ip=frommedia  nosplash
    initrd /gparted/live/initrd.img
    
    # Suggested by Deb
    title Partition Wizard 5 (Partition Tools)
    find --set-root /pwhe5.iso
    map /pwhe5.iso (hd32)
    map --hook
    root (hd32)
    chainloader (hd32)
    
    title Boot Clonezilla
    find --set-root /clonezilla/live/initrd1.img
    kernel /clonezilla/live/vmlinuz1 boot=live live-config noswap nolocales edd=on nomodeset ocs_live_run='ocs-live-general' ocs_live_extra_param='' ocs_live_keymap='' ocs_live_batch='no' ocs_lang='' vga=788 ip=frommedia nosplash live-media-path=/clonezilla/live toram=filesystem.squashfs
    initrd /clonezilla/live/initrd1.img
    
    
    title Redo Backup and Recovery
    find --set-root --ignore-floppies --ignore-cd /redobackup.iso
    map --heads=0 --sectors-per-track=0 /redobackup.iso (hd32)
    map --hook
    chainloader (hd32)
    
    title Kaspersky Rescue CD (Virus Scanner)
    find --set-root /rescue/rescue.iso
    map /rescue/rescue.iso (0xff)
    map --hook
    root (0xff)
    chainloader (0xff)
    
    title AVG Rescue CD (Anti-Virus + Anti-Spyware)
    find --set-root /avg.iso
    map /avg.iso (hd32)
    map --hook
    chainloader (hd32)
    
    # Suggested by Zach
    title BitDefender Rescue CD (Virus Scanner)
    find --set-root /bitdefender-rescue-cd.iso
    map /bitdefender-rescue-cd.iso (0xff)
    map --hook
    root (0xff)
    kernel /casper/vmlinuz boot=casper iso-scan/filename=/bitdefender-rescue-cd.iso
    initrd /casper/initrd.gz
    
    title AVIRA AntiVir Rescue CD (Virus Scanner)
    find --set-root /avira/vmlinuz
    kernel /avira/vmlinuz edd=off vga=ask initrd=/avira/initrd.gz ramdisk_size=133551 root=/dev/ram0 rw console=/dev/vc/4
    initrd /avira/initrd.gz
    
    title Jolicloud (NetBook Distro)
    find --set-root /Jolicloud-1.0.iso
    map --heads=0 --sectors-per-track=0 /Jolicloud-1.0.iso (0xff)
    map --hook
    root (0xff)
    kernel /casper/vmlinuz noprompt cdrom-detect/try-usb=true file=/cdrom/preseed/jolicloud.seed boot=casper persistent iso-scan/filename=/Jolicloud-1.0.iso splash
    initrd /casper/initrd.gz
    
    title EASUS Disk Copy
    find --set-root /DiskCopy2.3.iso
    map --mem /DiskCopy2.3.iso (hd32)
    map --hook
    root (hd32)
    chainloader (hd32)
    
    title BackTrack 4 Final (Penetration Testing)
    find --set-root /bt-boot/vmlinuz
    kernel /bt-boot/vmlinuz BOOT=casper boot=casper persistent rw splash
    initrd /bt-boot/initrd.gz
    boot
    
    title Install Mandriva Linux Free 2010.0
    find --set-root /mandriva/i586/isolinux/alt0/all.rdz
    kernel /mandriva/i586/isolinux/alt0/vmlinuz root=(hd0,0) splash=silent
    initrd /mandriva/i586/isolinux/alt0/all.rdz
    
    title Install Windows Vista/7
    root (hd0,0)
    chainloader (hd0,0)/bootmgr
    
    # Suggested by Gino Pilotino
    title System Rescue CD
    find --set-root /systemrescuecd/isolinux/rescuecd
    kernel /systemrescuecd/isolinux/rescuecd subdir=systemrescuecd setkmap=us docache
    initrd /systemrescuecd/isolinux/initram.igz
    
    title Trinity Rescue Kit
    kernel /TRK/kernel.trk vollabel=MULTIBOOT ramdisk_size=65536 root=/dev/ram0 vga=788 splash=verbose pci=conf1 trkmenu
    initrd /TRK/initrd.trk
    
    # Suggested by Jugal
    title Austrumi
    find --set-root /austrumi/austrumi.fs
    kernel /austrumi/bzImage dousb lang_en
    initrd /austrumi/initrd.gz
    
    title WIFIWAY
    find --set-root /WIFI/boot/initrd.gz
    kernel /WIFI/boot/vmlinuz vga=791 max_loop=255 ramdisk_size=6666 root=/dev/ram0 rw autoexec=xconf;telinit~4 changes=/changes/changes.dat
    initrd /WIFI/boot/initrd.gz


    Thanks a million for your help its surely needed and respected.

    -infringer-

Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured