Filename prefix

Apologies for asking such a rudimentary question.  I am setting up scan to network folders and setup has asked for a filename prefix.  What is it and where do I find it?  Upgrading from 8600 which didn't ask this question, so I have the files already named.
This question was solved.
View Solution.

Hello @JDJLacrosse ,
Welcome to the HP forum.
No need to apologise. It is a valid question.
When you scanned a document, from the front panel of your old 8600, It would save the file as scan0001.PDF.
The prefix used was scan.
The new software is just asking you what you would like the prefix to be.
It is meant to help you find scans, done from the front panel, easier.
Aardvark1
I work on behalf of HP
Please click “Accept as Solution ” if you feel my post solved your issue, it will help others find the solution.
Click the “Kudos Thumbs Up" on the right to say “Thanks” for helping!

Similar Messages

  • Automating the filename prefix in Layer Comps to files...

    Hi All
    I'm hoping someone can help me with some automation. I have no real clue about scripting, I just know that clever things can be done, hopefully someone could point me in the right direction!
    I'm superimposing some t-shirt designs onto images of blank t-shirts.
    Each different colour T-shirt (15 colours) is on an individual layer, so I have 15 layers.
    So to create 15 images of a given t-shirt design (one image for each colour shirt) I need to:
    1) Import a design onto the top layer
    2) Update all 15 layer comps
    3) Hit the 'Layer Comps to Files' button
    4) Put a unique identifier into the filename prefix field
    5) Go to 1)
    So I guess my question is this:
    Can I automate any more of this? For example can I have the filename prefix pulled in from the Layer name? So I'd just name the top layer (with the design on) and PS would pull that layer name into the filename prefix field?
    And can I update all those layer comps automatically (when I put the next design on) rather than selecting each one and updating manually?
    Any help appreciated from a scripting novice!
    Kind Regards
    Mark

    If you turn the top layer with the design into a smart layer then manually update the layer comps once and save the file as a template you can then use the menu item Layer-Smart Object-Replace Cotents... to change out the design in a way that would no longer require updating the layer comps. Changing the content of a smart object does not effect the layer comp status like adding a new layer would.
    In the Layer Comps to Files.jsx if you find the line
    var fileNameBody = exportInfo.fileNamePrefix;
    and replace it with
    var fileNameBody = app.activeDocument.layers[0].name;// top layer name
    The script will no longer use the prefix from the dialog and instead use the top layer's name as the prefix.
    To automate the whole process would require creating a custom script. The Layer Comps to Files script was not written to be called from another script.

  • Changing the filename prefix or setting the starting number

    I have two PowerShots. I have been using one for years. My newer one sets the filenames with the same prefix, IMG, and starts numbering at 0001. Can I change this so I don't get duplicate filenames in my photo library. I realize that having the new photos in different folders will help to prevent overwriting the existing ones. I would like to prevent the confusion or possible overwriting by mistake.
    Thanks for any advice.

    Hi Apic13,
    To keep your camera from resetting the file numbers, press the MENU button and go to the settings tab, It's yellow and normally has a wrench and hammer on it.  Now scroll down to "File Numbering", then use the right or left arrow to choose "Continuous", then press the MENU button again.
    This may vary slightly from model to model.
    I hope this helps,
    Richard
    Did this answer your question? Please click the Accept as Solution button so that others may find the answer as well.

  • Saving slices with a fixed prefix of choice

    [Edit: I just discovered a wonderful Batch Rename option in Bridge, so this is a good workaround for me]
    I have a file with many slices. The file has several layer comps and they just change the color cast with hue-sat adjustment, so they are named "green", "yellow", "red", etc. I must save the slices for each layer comp into globally unique named files, because later they will be mixed all together on a web site. Ideally, the names would be like this:
    green_slice1.jpg
    green_slice2.jpg
    yellow_slice1.jpg
    yellow_slice2.jpg
    where "green" and "yellow" are after layer comp name and the rest is slice name.
    I looked into the "Other" Output Settings options, File Naming section but there seems to be no option for layer comp prefix or any user invented prefix that would enable me to save them to the same folder and not override (I wouldn't mind typing manually the color name, but there is no option to "use an arbitrary word of your choice"). So it looks like the only solution is to save each layer comp to a separate document and then use the Save for Web and Devices in each document with the doc. Name filename prefix. But I am asking here just in case that maybe there is some workaround, because making copies of such files is a bit artificial, just for saving and then delete and a bit of waste of time.

    There are Text bullets which would allow you to start with "Part" but you can't then combine that with numbered lists in the following indent of the line.
    I can't imagine that it will be such a burden to have to label this level manually, or simply omit the redundent "Part". The division should be obvious from the context.
    It is something I find totally redundant in tutorials when people repeatedly label things Step 1, Step 2, Step 3 etc. They are just 1, 2, 3 etc and obviously steps, or whatever else you want to describe them.
    Imagine adding "Point" in front of every • bullet. "Dash" in front of every -.
    Peter

  • Reversing the "avoid track-number in filename" setting ?

    Strange question, I know, but....
    Been doing the changes to the iTunesPrefs.xml file as discussed in many threads:
    </data>
    <key>create-filenames-with-disknumber</key>
    <data>
    AA==
    </data>
    with some success, and iTunes was working away reorganizing my library without the filenames prefixed with track numbers, as I wanted.
    However, WinXP being Windows, crashed in mid-reorg and iTunes did not complete its reorg. Upon rebooting and fixing the basic iTunes preferences again, iTunes now seems to ignore the setting altogether, and then some: it reorganizes without the track number or even the artist name in front of the track title!
    So I end up with:
    S:\Our Music\Elvis Presley\Elvis in Concert\Are You Lonesome Tonight.mp3
    S:\Our Music\Elvis Presley\Elvis in Concert\Can't Help Falling in Love.mp3
    instead of:
    S:\Our Music\Elvis Presley\Elvis in Concert\Elvis Presley - Are You Lonesome Tonight.mp3
    S:\Our Music\Elvis Presley\Elvis in Concert\Elvis Presley - Can't Help Falling in Love.mp3
    or even:
    S:\Our Music\Elvis Presley\Elvis in Concert\1 - Are You Lonesome Tonight.mp3
    S:\Our Music\Elvis Presley\Elvis in Concert\2 - Can't Help Falling in Love.mp3
    Is there another "key" to tell it to use the artist name? Or how about a simple reversal of the track number setting? What would be the equivalent of TRUE if "AA==" means FALSE?
    Incidently, removing the section altogether does not revert back to filenames-with-disknumber... that would be too easy!
    Any help would be appreciated.

    I prefer to do all ID3 editing outside of iTunes, as I have seen edits to be not directly made to files. I am big on tagscanner 5.0 after organizing my entire library of over 8800 songs. Tagscanner will allow you to rename your files based on several ID3 values. I can explain.
    When using tagscanner 5.0, you make edits to the song title, album, artist, album artist, track number (#/# if you want the "of"), year, album art, comment, genre, disc #, composer, publisher...blah blah blah. You can then rename each file using the values that have been entered or already known. You want title, track number, codec type, length in seconds...select those. It is easy to tell it what you want in a file name. You just want artist and title, easy enough, just tell it you want just that. There is a drop down where you can select the more popular formats, you can even add your own characters to the file name.
    I used tagscanner to clean up the ID3 tags and file/folder names of my entire library. Once I got started, it went pretty fast, each album only took about a minute to do, including finding artwork.

  • [Solved] how do i build my ISO image with archiso?

    hi all
    i've been following this wiki and it's been going really well (it hasn't gone wrong...). but the wiki page just sort of stops halfway through the configuration bit
    a google search brought me to this page which suggests using the "build.sh" script located in my chroot environment's /tmp/releng/ directory.
    running this script returns the error "build.sh: line 207: syntax error near unexpected token '('
    line 207 of the file reads:
    paste -d"\n" <(sed "s|%ARCH%|i686|g" ${script_path}/aitab.${_iso_type}) \
    i don't really know much about scripts so i can't see what's wrong
    any advice?
    sorry if i've missed a wiki or something n00bish like that. also i'm aware that someone who doesn't know what they're doing shouldn't be attempting archiso but i thought it would be a fun learning experience
    here's the full build.sh in case it is helpful:
    #!/bin/bash
    set -e -u
    iso_name=archlinux
    iso_label="ARCH_$(date +%Y%m)"
    iso_version=$(date +%Y.%m.%d)
    install_dir=arch
    arch=$(uname -m)
    work_dir=work
    out_dir=out
    verbose=""
    script_path=$(readlink -f ${0%/*})
    # Base installation (root-image)
    make_basefs() {
    mkarchiso ${verbose} -w "${work_dir}" -D "${install_dir}" -p "base" create
    mkarchiso ${verbose} -w "${work_dir}" -D "${install_dir}" -p "memtest86+ syslinux mkinitcpio-nfs-utils nbd curl" create
    # Additional packages (root-image)
    make_packages() {
    mkarchiso ${verbose} -w "${work_dir}" -D "${install_dir}" -p "$(grep -v ^# ${script_path}/packages.${arch})" create
    # Copy mkinitcpio archiso hooks (root-image)
    make_setup_mkinitcpio() {
    if [[ ! -e ${work_dir}/build.${FUNCNAME} ]]; then
    local _hook
    for _hook in archiso archiso_shutdown archiso_pxe_common archiso_pxe_nbd archiso_pxe_http archiso_pxe_nfs archiso_loop_mnt; do
    cp /lib/initcpio/hooks/${_hook} ${work_dir}/root-image/lib/initcpio/hooks
    cp /lib/initcpio/install/${_hook} ${work_dir}/root-image/lib/initcpio/install
    done
    cp /lib/initcpio/install/archiso_kms ${work_dir}/root-image/lib/initcpio/install
    cp /lib/initcpio/archiso_shutdown ${work_dir}/root-image/lib/initcpio
    cp /lib/initcpio/archiso_pxe_nbd ${work_dir}/root-image/lib/initcpio
    cp ${script_path}/mkinitcpio.conf ${work_dir}/root-image/etc/mkinitcpio-archiso.conf
    : > ${work_dir}/build.${FUNCNAME}
    fi
    # Prepare ${install_dir}/boot/
    make_boot() {
    if [[ ! -e ${work_dir}/build.${FUNCNAME} ]]; then
    local _src=${work_dir}/root-image
    local _dst_boot=${work_dir}/iso/${install_dir}/boot
    mkdir -p ${_dst_boot}/${arch}
    mkarchroot -n -r "mkinitcpio -c /etc/mkinitcpio-archiso.conf -k /boot/vmlinuz-linux -g /boot/archiso.img" ${_src}
    mv ${_src}/boot/archiso.img ${_dst_boot}/${arch}/archiso.img
    mv ${_src}/boot/vmlinuz-linux ${_dst_boot}/${arch}/vmlinuz
    cp ${_src}/boot/memtest86+/memtest.bin ${_dst_boot}/memtest
    cp ${_src}/usr/share/licenses/common/GPL2/license.txt ${_dst_boot}/memtest.COPYING
    : > ${work_dir}/build.${FUNCNAME}
    fi
    # Prepare /${install_dir}/boot/syslinux
    make_syslinux() {
    if [[ ! -e ${work_dir}/build.${FUNCNAME} ]]; then
    local _src_syslinux=${work_dir}/root-image/usr/lib/syslinux
    local _dst_syslinux=${work_dir}/iso/${install_dir}/boot/syslinux
    mkdir -p ${_dst_syslinux}
    for _cfg in ${script_path}/syslinux/*.cfg; do
    sed "s|%ARCHISO_LABEL%|${iso_label}|g;
    s|%INSTALL_DIR%|${install_dir}|g;
    s|%ARCH%|${arch}|g" ${_cfg} > ${_dst_syslinux}/${_cfg##*/}
    done
    cp ${script_path}/syslinux/splash.png ${_dst_syslinux}
    cp ${_src_syslinux}/*.c32 ${_dst_syslinux}
    cp ${_src_syslinux}/*.com ${_dst_syslinux}
    cp ${_src_syslinux}/*.0 ${_dst_syslinux}
    cp ${_src_syslinux}/memdisk ${_dst_syslinux}
    mkdir -p ${_dst_syslinux}/hdt
    wget -O - http://pciids.sourceforge.net/v2.2/pci.ids | gzip -9 > ${_dst_syslinux}/hdt/pciids.gz
    cat ${work_dir}/root-image/lib/modules/*-ARCH/modules.alias | gzip -9 > ${_dst_syslinux}/hdt/modalias.gz
    : > ${work_dir}/build.${FUNCNAME}
    fi
    # Prepare /isolinux
    make_isolinux() {
    if [[ ! -e ${work_dir}/build.${FUNCNAME} ]]; then
    mkdir -p ${work_dir}/iso/isolinux
    sed "s|%INSTALL_DIR%|${install_dir}|g" ${script_path}/isolinux/isolinux.cfg > ${work_dir}/iso/isolinux/isolinux.cfg
    cp ${work_dir}/root-image/usr/lib/syslinux/isolinux.bin ${work_dir}/iso/isolinux/
    cp ${work_dir}/root-image/usr/lib/syslinux/isohdpfx.bin ${work_dir}/iso/isolinux/
    : > ${work_dir}/build.${FUNCNAME}
    fi
    # Customize installation (root-image)
    # NOTE: mkarchroot should not be executed after this function is executed, otherwise will overwrites some custom files.
    make_customize_root_image() {
    if [[ ! -e ${work_dir}/build.${FUNCNAME} ]]; then
    cp -af ${script_path}/root-image ${work_dir}
    chmod 750 ${work_dir}/root-image/etc/sudoers.d
    chmod 440 ${work_dir}/root-image/etc/sudoers.d/g_wheel
    mkdir -p ${work_dir}/root-image/etc/pacman.d
    wget -O ${work_dir}/root-image/etc/pacman.d/mirrorlist http://www.archlinux.org/mirrorlist/all/
    sed -i "s/#Server/Server/g" ${work_dir}/root-image/etc/pacman.d/mirrorlist
    chroot ${work_dir}/root-image /usr/sbin/locale-gen
    chroot ${work_dir}/root-image /usr/sbin/useradd -m -p "" -g users -G "audio,disk,optical,wheel" arch
    : > ${work_dir}/build.${FUNCNAME}
    fi
    # Split out /lib/modules from root-image (makes more "dual-iso" friendly)
    make_lib_modules() {
    if [[ ! -e ${work_dir}/build.${FUNCNAME} ]]; then
    mv ${work_dir}/root-image/lib/modules ${work_dir}/lib-modules
    : > ${work_dir}/build.${FUNCNAME}
    fi
    # Split out /usr/share from root-image (makes more "dual-iso" friendly)
    make_usr_share() {
    if [[ ! -e ${work_dir}/build.${FUNCNAME} ]]; then
    mv ${work_dir}/root-image/usr/share ${work_dir}/usr-share
    : > ${work_dir}/build.${FUNCNAME}
    fi
    # Make [core] repository, keep "any" pkgs in a separate fs (makes more "dual-iso" friendly)
    make_core_repo() {
    if [[ ! -e ${work_dir}/build.${FUNCNAME} ]]; then
    local _url _urls _pkg_name _cached_pkg _dst _pkgs
    mkdir -p ${work_dir}/repo-core-any
    mkdir -p ${work_dir}/repo-core-${arch}
    pacman -Sy
    _pkgs=$(comm -2 -3 <(pacman -Sql core | sort | sed 's@^@core/@') \
    <(grep -v ^# ${script_path}/core.exclude.${arch} | sort | sed 's@^@core/@'))
    _urls=$(pacman -Sddp ${_pkgs})
    pacman -Swdd --noprogressbar --noconfirm ${_pkgs}
    for _url in ${_urls}; do
    _pkg_name=${_url##*/}
    _cached_pkg=/var/cache/pacman/pkg/${_pkg_name}
    _dst=${work_dir}/repo-core-${arch}/${_pkg_name}
    cp ${_cached_pkg} ${_dst}
    repo-add -q ${work_dir}/repo-core-${arch}/core.db.tar.gz ${_dst}
    if [[ ${_pkg_name} == *any.pkg.tar* ]]; then
    mv ${_dst} ${work_dir}/repo-core-any/${_pkg_name}
    ln -sf ../any/${_pkg_name} ${_dst}
    fi
    done
    : > ${work_dir}/build.${FUNCNAME}
    fi
    # Process aitab
    # args: $1 (core | netinstall)
    make_aitab() {
    local _iso_type=${1}
    if [[ ! -e ${work_dir}/build.${FUNCNAME}_${_iso_type} ]]; then
    sed "s|%ARCH%|${arch}|g" ${script_path}/aitab.${_iso_type} > ${work_dir}/iso/${install_dir}/aitab
    : > ${work_dir}/build.${FUNCNAME}_${_iso_type}
    fi
    # Build all filesystem images specified in aitab (.fs .fs.sfs .sfs)
    make_prepare() {
    mkarchiso ${verbose} -w "${work_dir}" -D "${install_dir}" prepare
    # Build ISO
    # args: $1 (core | netinstall)
    make_iso() {
    local _iso_type=${1}
    mkarchiso ${verbose} -w "${work_dir}" -D "${install_dir}" checksum
    mkarchiso ${verbose} -w "${work_dir}" -D "${install_dir}" -L "${iso_label}" -o "${out_dir}" iso "${iso_name}-${iso_version}-${_iso_type}-${arch}.iso"
    # Build dual-iso images from ${work_dir}/i686/iso and ${work_dir}/x86_64/iso
    # args: $1 (core | netinstall)
    make_dual() {
    local _iso_type=${1}
    if [[ ! -e ${work_dir}/dual/build.${FUNCNAME}_${_iso_type} ]]; then
    if [[ ! -d ${work_dir}/i686/iso || ! -d ${work_dir}/x86_64/iso ]]; then
    echo "ERROR: i686 or x86_64 builds does not exist."
    _usage 1
    fi
    local _src_one _src_two _cfg
    if [[ ${arch} == "i686" ]]; then
    _src_one=${work_dir}/i686/iso
    _src_two=${work_dir}/x86_64/iso
    else
    _src_one=${work_dir}/x86_64/iso
    _src_two=${work_dir}/i686/iso
    fi
    mkdir -p ${work_dir}/dual/iso
    cp -a -l -f ${_src_one} ${work_dir}/dual
    cp -a -l -n ${_src_two} ${work_dir}/dual
    rm -f ${work_dir}/dual/iso/${install_dir}/aitab
    rm -f ${work_dir}/dual/iso/${install_dir}/boot/syslinux/*.cfg
    if [[ ${_iso_type} == "core" ]]; then
    if [[ ! -e ${work_dir}/dual/iso/${install_dir}/any/repo-core-any.sfs ||
    ! -e ${work_dir}/dual/iso/${install_dir}/i686/repo-core-i686.sfs ||
    ! -e ${work_dir}/dual/iso/${install_dir}/x86_64/repo-core-x86_64.sfs ]]; then
    echo "ERROR: core_iso_single build is not found."
    _usage 1
    fi
    else
    rm -f ${work_dir}/dual/iso/${install_dir}/any/repo-core-any.sfs
    rm -f ${work_dir}/dual/iso/${install_dir}/i686/repo-core-i686.sfs
    rm -f ${work_dir}/dual/iso/${install_dir}/x86_64/repo-core-x86_64.sfs
    fi
    paste -d"\n" <(sed "s|%ARCH%|i686|g" ${script_path}/aitab.${_iso_type}) \
    <(sed "s|%ARCH%|x86_64|g" ${script_path}/aitab.${_iso_type}) | uniq > ${work_dir}/dual/iso/${install_dir}/aitab
    for _cfg in ${script_path}/syslinux.dual/*.cfg; do
    sed "s|%ARCHISO_LABEL%|${iso_label}|g;
    s|%INSTALL_DIR%|${install_dir}|g" ${_cfg} > ${work_dir}/dual/iso/${install_dir}/boot/syslinux/${_cfg##*/}
    done
    mkarchiso ${verbose} -w "${work_dir}/dual" -D "${install_dir}" checksum
    mkarchiso ${verbose} -w "${work_dir}/dual" -D "${install_dir}" -L "${iso_label}" -o "${out_dir}" iso "${iso_name}-${iso_version}-${_iso_type}-dual.iso"
    : > ${work_dir}/dual/build.${FUNCNAME}_${_iso_type}
    fi
    purge_single ()
    if [[ -d ${work_dir} ]]; then
    find ${work_dir} -mindepth 1 -maxdepth 1 \
    ! -path ${work_dir}/iso -prune \
    | xargs rm -rf
    fi
    purge_dual ()
    if [[ -d ${work_dir}/dual ]]; then
    find ${work_dir}/dual -mindepth 1 -maxdepth 1 \
    ! -path ${work_dir}/dual/iso -prune \
    | xargs rm -rf
    fi
    clean_single ()
    rm -rf ${work_dir}
    rm -f ${out_dir}/${iso_name}-${iso_version}-*-${arch}.iso
    clean_dual ()
    rm -rf ${work_dir}/dual
    rm -f ${out_dir}/${iso_name}-${iso_version}-*-dual.iso
    make_common_single() {
    make_basefs
    make_packages
    make_setup_mkinitcpio
    make_boot
    make_syslinux
    make_isolinux
    make_customize_root_image
    make_lib_modules
    make_usr_share
    make_aitab $1
    make_prepare $1
    make_iso $1
    _usage ()
    echo "usage ${0} [options] command <command options>"
    echo
    echo " General options:"
    echo " -N <iso_name> Set an iso filename (prefix)"
    echo " Default: ${iso_name}"
    echo " -V <iso_version> Set an iso version (in filename)"
    echo " Default: ${iso_version}"
    echo " -L <iso_label> Set an iso label (disk label)"
    echo " Default: ${iso_label}"
    echo " -D <install_dir> Set an install_dir (directory inside iso)"
    echo " Default: ${install_dir}"
    echo " -w <work_dir> Set the working directory"
    echo " Default: ${work_dir}"
    echo " -o <out_dir> Set the output directory"
    echo " Default: ${out_dir}"
    echo " -v Enable verbose output"
    echo " -h This help message"
    echo
    echo " Commands:"
    echo " build <mode> <type>"
    echo " Build selected .iso by <mode> and <type>"
    echo " purge <mode>"
    echo " Clean working directory except iso/ directory of build <mode>"
    echo " clean <mode>"
    echo " Clean working directory and .iso file in output directory of build <mode>"
    echo
    echo " Command options:"
    echo " <mode> Valid values 'single' or 'dual'"
    echo " <type> Valid values 'netinstall', 'core' or 'all'"
    exit ${1}
    if [[ ${EUID} -ne 0 ]]; then
    echo "This script must be run as root."
    _usage 1
    fi
    while getopts 'N:V:L:D:w:o:vh' arg; do
    case "${arg}" in
    N) iso_name="${OPTARG}" ;;
    V) iso_version="${OPTARG}" ;;
    L) iso_label="${OPTARG}" ;;
    D) install_dir="${OPTARG}" ;;
    w) work_dir="${OPTARG}" ;;
    o) out_dir="${OPTARG}" ;;
    v) verbose="-v" ;;
    h|?) _usage 0 ;;
    _msg_error "Invalid argument '${arg}'" 0
    _usage 1
    esac
    done
    shift $((OPTIND - 1))
    if [[ $# -lt 1 ]]; then
    echo "No command specified"
    _usage 1
    fi
    command_name="${1}"
    if [[ $# -lt 2 ]]; then
    echo "No command mode specified"
    _usage 1
    fi
    command_mode="${2}"
    if [[ ${command_name} == "build" ]]; then
    if [[ $# -lt 3 ]]; then
    echo "No build type specified"
    _usage 1
    fi
    command_type="${3}"
    fi
    if [[ ${command_mode} == "single" ]]; then
    work_dir=${work_dir}/${arch}
    fi
    case "${command_name}" in
    build)
    case "${command_mode}" in
    single)
    case "${command_type}" in
    netinstall)
    make_common_single netinstall
    core)
    make_core_repo
    make_common_single core
    all)
    make_common_single netinstall
    make_core_repo
    make_common_single core
    echo "Invalid build type '${command_type}'"
    _usage 1
    esac
    dual)
    case "${command_type}" in
    netinstall)
    make_dual netinstall
    core)
    make_dual core
    all)
    make_dual netinstall
    make_dual core
    echo "Invalid build type '${command_type}'"
    _usage 1
    esac
    echo "Invalid build mode '${command_mode}'"
    _usage 1
    esac
    purge)
    case "${command_mode}" in
    single)
    purge_single
    dual)
    purge_dual
    echo "Invalid purge mode '${command_mode}'"
    _usage 1
    esac
    clean)
    case "${command_mode}" in
    single)
    clean_single
    dual)
    clean_dual
    echo "Invalid clean mode '${command_mode}'"
    _usage 1
    esac
    echo "Invalid command name '${command_name}'"
    _usage 1
    esac
    Last edited by gav989 (2012-02-12 10:59:11)

    thanks for that, according to this it should be run like
    /path/to/build.sh build single netinstall
    from inside the chroot
    posting this for my own reference and in case it helps others, will mark as solved
    thanks again for your help
    Last edited by gav989 (2012-02-12 10:58:04)

  • InDesign Export to PDF and PDF Destinations/Bookmarks

    Hello all,
    I am new to this forum and am not sure where the most appropriate location for this question is. But, here goes:
    We are adding Bookmarks to an InDesign Doc then exporting it to a PDF. In the Acrobat Reader and the IE Acrobat reader the bookmarks work just fine. Here his where the problem is. I have to link to the PDF's bookmarks from a web page. I have come to find out that I can't link directly to a bookmark but I have to link to a "Destination."
    The PDF Exporter or InDesign adds a Destination name that is not the same as the bookmark name. It includes the indd file name and the part of the sentience that the book mark is next to.
    I have used Adobe Acrobat Professional to create a custom Destination that is one word without spaces. I am able to link to that destination but I can't link to any of the destinations that either InDesign or the PDF exporter created.
    Does anyone know how to force the Destinations names to be set to the name of the bookmark that is being mapped to it? Or, how to link to a bookmark name rather then a Destination.
    I have also did some searching for some VB to Acrobat scripting and found that I can't edit Destination names.
    This is for an on going project that is sure to have a lot of updates. We do not want to have to goto Acrobat and fix the Destinations by hand for every update. Plus, we don't want to link to the page number because we are never sure when pages will change and again do not want to always fix the PDF or HTML index page every time.
    Thank you for your time,
    Michael Hamilton
    Learning Designs Inc

    Michael, I've got one solution that meets my needs but maybe only part of your needs:
    Buy AutoBookmark from Evermap:  http://www.evermap.com/autobookmark.asp#Creating%20Destinations%20From%20Bookmarks
    It's a plugin to Adobe Acrobat (not Reader), but it works only in MS Windows, not Mac.
    After you've installed that plugin, Acrobat's Plug Ins menu has a Destinations menu item with some choices you're going to use.
    Open with Acrobat, the PDF file that has the destination names that have that bothersome <filename>.indd prefix.  Use the Plug Ins > Destinations menu's item to export the destinations as a plain text file.
    Edit the resulting plain text file with any plain text editor.  Globally search and replace the filename prefix with nothing.  Save and close that file.
    Back in the Acrobat window of your PDF file, use the Destinations menu's choice to delete all destinations.
    Now use the Destinations menu to import the destinations file you just edited.
    Voila.
    BUT the part of your problem that this won't solve, is the presence of a portion of the sentence in the destination.  That's not a problem for me, because I'm creating all my destinations as parts of the sentence.

  • File Attachment in Sandboxed Solution

    I was using below code to insert item in the list with the file attachement using farm solution
    <asp:TextBox ID="txtBoxTitle" runat="server"></asp:TextBox>
    <asp:FileUpload ID="flUpload" runat="server" />
    <asp:Button ID="btnSave" runat="server" Text="Save" OnClick="btnSave_Click"  />
    in code behind
     protected void btnSave_Click(object sender, EventArgs e)
                try
                    using (SPSite site = new SPSite(SPContext.Current.Site.OpenWeb().Url))
                        using (SPWeb web = site.OpenWeb())
                            SPList list = web.Lists["Test"];
                            SPListItem item = list.Items.Add();
                            item["Title"] = txtBoxTitle.Text;
                            AttachfileToListWithPrefix(item, flUpload, "", "Attachment1_");
                            item.Update();
                catch (Exception ex)
            public static void AttachfileToListWithPrefix(SPListItem item, FileUpload file, string fileName, string prefix)
                if (file.PostedFile != null && file.HasFile)
                    if (file.PostedFile.ContentLength > 0)
                        if (fileName == "")
                            fileName = file.PostedFile.FileName;
                            fileName = fileName.Substring(fileName.LastIndexOf(@"\") + 1).Replace(@"\", "");
                        System.IO.Stream stream = file.PostedFile.InputStream;
                        byte[] contents = new byte[stream.Length];
                        stream.Read(contents, 0, (int)stream.Length);
                        stream.Close();
                        stream.Dispose();
                        //to identify each attachment with list item...because item might have 1 to 6 different attachment(s)
                        fileName = prefix + fileName;
                        //objAttchments.Add(fileName, byt);   
                        SPAttachmentCollection objAttchments = item.Attachments;
                        if (objAttchments.Count > 0)
                            for (int i = 0; i < objAttchments.Count; i++)
                                if (objAttchments[i].Contains(prefix))
                                    objAttchments.Delete(objAttchments[i]);
                        objAttchments.Add(fileName, contents);
    now i want to do the same thing in the sandboxed solution,but when  i try to do that it does not insert attachment in the list.
    can anyone help how can i insert attachment through sandboxed solution??

    can anyone help me on this??

  • Preparing audio for CD burning

    I think that the information here applies to all versions of Audition, including CS5.5, because it relates to using an external burner. There may be small variations between different versions, but I will check this out and modify the document later, if needs be. Ozpeter's original guide (which this mainly is) will certainly give you the basic information you need, though:
    If this is the first time you've tried this, you might consider using a  suitable test file to experiment on, and burn to a re-writable CD.
    Assuming  that your material is fully prepared - that you have got a single  44.1kHz 16-bit stereo file displayed in edit view, possibly as a result  of a mixdown from the multitrack - you can proceed as follows:
    Right click on the time scale at the bottom of the waveform.
    Choose 'Display Time Format>Compact Disc 75fps'.
    Right click on the time scale again
    Choose 'Snapping>Snap to frames (always)'.
    Those steps should help ensure click-free transitions from one track to another.
    Go  to the beginning of the file and click there, so that the cursor is at  00:00:00:00 - press F8, and that will drop a cue mark there representing  the start of track one on the CD. Now place the cursor at the point in  the file that you want to set as the beginning of the second CD track.  Press F8 to place a cue mark there. Proceed through the file in a  similar fashion until the start of every track has been marked. Then  finally place a cue mark at the end of the last track, normally the end  of your displayed file.
    It might be a good idea to save the file now, with the cue marks in it. To ensure that the cues are saved, use "save as..." and put a check mark in the "save non-audio data" box. The program should default to this setting in the future.
    Now select 'View>Show Cue List'.
    In normal Windows fashion highlight (select) all the cues listed there.
    Press the Merge button that is part of the cue list window.
    Your  cues have now been changed into ranges , which represent the start of  track one to the end of track one, the start of track two to the end of  track two, and so on.
    Now highlight all the ranges, and press the 'Batch' button.
    In the dialog that appears, click on the 'Save to files' button so that the lower part of the dialog is enabled.
    Enter  something relevant in the 'Filename prefix' box - like "Track" or  "Song" or whatever - this will ultimately create files called "Track1,  Track2" etc or "Song1, Song2...."
    Set Seq. Start to "1".
    Specify the Destination Folder in normal Windows fashion.
    Set the Output Format to "Windows PCM".
    Click on "OK"
    This will generate in the directory you specified the files you will then burn to CD using Nero or whatever.
    In  Nero, the audio CD wizard should guide you through the process. Each  file will become a separate track with a separate track number.
    If  you have allowed space between the tracks when you laid them out in the  Edit view in the first place, you probably don't want Nero to add 2  seconds between each track. The same applies if it is continuous  material like a live concert - you don't want silence between the  tracks. So in the Nero list of tracks, highlight all but the first  track, right click and select Properties, then set 'Pause' to zero.
    In the burn dialog, make sure that you set the Write Method to 'disc at once'.
    Sounds  complicated? Not really. Once you've done it the first couple of times,  it will only take you a few moments. Once you've seen and understood  what's happening you should be able to adapt these instructions to suit  different circumstances as the need arises.

    An alternative approach to preparing material for CD burning using Adobe  Audition is provided through the use of "CueListTool", a small freeware  program available from http://www.stefanbion.de/cueltool/ which prepares a Cue List which Nero and EAC and other packages can use.
    It's  simply necessary to insert cues in your mixdown at the points where  each track begins. You don't need to use the 'Merge' and 'Batch'  processes described above - you'll be burning direct from the single  master file. CueListTool will write a Cue Sheet containing the points  you've marked. Then in Nero use 'File > Burn Image" to create the CD.  Or in EAC use 'Tools > Burn CDR... > File >Load Cue Sheet'.
    Yet  another method is possible if you have the Nero CD burning program -  proceed in Nero as if burning an audio CD containing one track, using  your entire mixdown (or other) file which contains cues where you want  each track to start. Then, still in Nero, right click on the file and  choose "Properties", then choose "Indexes Limits Split" tab, and click  on "Split at index positions" and follow the subsequent prompts. Nero  will then create tracks based on the location of your cue marks.
    Further information concerning a question regarding the use of Audition with CueListTool 1.7 to burn a CD with Nero:-
    Having  prepared (in Audition or CE) a 44.1/16 stereo file with track cue  points at each place you want a track to start, including the beginning  of the first track, and saved it, and closed it, then....
    In CueListTool ver 1.7 - using strip of "buttons" on right side -
    Click Wav (topmost button) - and select file to burn
    Click Wav (next button down with green arrow) - to list cues
    Click Cue (7th button down with floppy disk icon) - to save cue sheet
    Fill in resulting dialog as required, then click "Save and Burn" at the bottom of the dialog
    Fill in resulting "save cue sheet" filename dialog
    Fill in resulting "Burn CD" dialog - here the two boxes read...
    "C\Program Files\Ahead\Nero\nero.exe"
    and
    "%s"
    in quotes in both cases.
    Click OK
    If  you have Nero installed that will then invoke it - if you know the  command line parameters for calling Nero, which appear somewhere in  Nero's documentation, you can add any other parameters you want in  addition to the "%s" - such as setting the speed. Here, when Nero runs,  you get the chance to set the speed anyway. I don't add extra  parameters.
    Sounds complicated when set out fully like that, but  once you've done it the first time, thereafter you can normally just  "click through" the dialogs, as they present themselves with sensible  last-used values, so it actually takes about 5 seconds.

  • Problems with Archiso

    Hi guys,
    I've got problems  with creating my own live-cd with archiso. I hope you are able to solve them.
    Here is the log describing my two ERRORs i get when i want to build it.
    init: /dev/initctl: No such file or directory
    ERROR: Root file system type detection failed.
    And here is my full log:
    mkarchiso -D myarch -p base create work
    mkarchiso : Configuration Settings
    working directory: work
    image name: none
    ====> Creating working directory: work
    ====> Installing packages to 'work/root-image/'
    ERROR: Root file system type detection failed.
    Cleaning up what we can
    mkarchiso -D myarch -p "dnsmasq dnsutils aufs2 aufs2-util base bash coreutils cpio dhcpcd dnsutils file fuse kernel26 syslinux nano" create work
    mkarchiso : Configuration Settings
    working directory: work
    image name: none
    ====> Creating working directory: work
    ====> Installing packages to 'work/root-image/'
    init: /dev/initctl: No such file or directory
    ERROR: Root file system type detection failed.
    init: /dev/initctl: No such file or directory
    Cleaning up what we can
    mkdir -p work/iso/myarch/boot/i686
    cp work/root-image/boot/System.map26 work/iso/myarch/boot/i686/
    cp work/root-image/boot/vmlinuz26 work/iso/myarch/boot/i686/
    mkdir -p work/iso/syslinux
    cp work/root-image/usr/lib/syslinux/isolinux.bin work/iso/syslinux/
    cp boot-files/syslinux/syslinux.cfg work/iso/syslinux/syslinux.cfg
    mkdir -p work/iso/myarch/boot/i686/
    mkinitcpio -c ./mkinitcpio.conf -b work/root-image -k '2.6.37-ARCH' -g work/iso/myarch/boot/i686/archiso.img
    :: Begin build
    :: Parsing hook [base]
    :: Parsing hook [udev]
    :: Parsing hook [archiso]
    :: Parsing hook [pata]
    :: Parsing hook [scsi]
    :: Parsing hook [sata]
    :: Parsing hook [usb]
    :: Parsing hook [fw]
    :: Parsing hook [pcmcia]
    :: Parsing hook [filesystems]
    :: Parsing hook [usbinput]
    :: Generating module dependencies
    :: Generating image 'work/iso/myarch/boot/i686/archiso.img'...SUCCESS
    cp -r overlay work/
    sed "s|@ARCH@|i686|g" isomounts > work/iso/myarch/isomounts
    mkarchiso -D myarch -c gzip iso work /root/myarch/LocCon-2011.03.16-i686.iso
    mkarchiso : Configuration Settings
    working directory: work
    image name: /root/myarch/LocCon-2011.03.16-i686.iso
    ====> Generating SquashFS image for 'work/root-image'
    Creating SquashFS image. This may take some time...
    Image creation done in 1.47 minutes.
    ====> Generating SquashFS image for 'work/overlay'
    Creating SquashFS image. This may take some time...
    Image creation done in 0.00 minutes.
    ====> Making bootable image
    Creating ISO image...
    You can see, that even with the errors it builds the iso, but when i try to boot it, i get an error, that no default or ui is available. This may be caused by the errors while building...
    Last edited by Adock (2011-03-16 17:29:27)

    You want me to paste the output of help??
    [bran@ra ~/archlive]$ sudo bash build.sh -h
    usage build.sh [options]
    General options:
    -N <iso_name> Set an iso filename (prefix)
    Default: archlinux
    -V <iso_version> Set an iso version (in filename)
    Default: 2013.11.12
    -L <iso_label> Set an iso label (disk label)
    Default: ARCH_201311
    -D <install_dir> Set an install_dir (directory inside iso)
    Default: arch
    -w <work_dir> Set the working directory
    Default: work
    -o <out_dir> Set the output directory
    Default: out
    -v Enable verbose output
    -h This help message
    Your suspicion seems to be correct, but do you know why? I'm curious.
    [bran@ra ~]$ cp -r /usr/share/archiso/configs/releng .
    [bran@ra ~]$ cd releng/
    [bran@ra ~/releng]$ sudo bash build.sh -v
    sed: can't read /home/bran/releng/build.sh/pacman.conf: Not a directory
    [bran@ra ~/releng]$ sudo ./build.sh -v
    [mkarchiso] INFO: Configuration settings
    [mkarchiso] INFO: Command: init
    [mkarchiso] INFO: Architecture: i686
    [mkarchiso] INFO: Working directory: work/i686
    [mkarchiso] INFO: Installation directory: arch
    [mkarchiso] INFO: Pacman config file: work/pacman.conf
    [mkarchiso] INFO: Installing packages to 'work/i686/root-image/'...
    ==> Creating install root at work/i686/root-image
    ==> Installing packages to work/i686/root-image
    :: Synchronizing package databases...
    core 106.8 KiB 380K/s 00:00 [############################################################] 100%
    ^Cxtra 849.6 KiB 735K/s 00:00 [##################################--------------------------] 57%
    Interrupt signal received

  • Odd/Even Fields - Removing Pixel Rows In PS

    This is hard to explain, but I have a challenging task here in PS. There has to be a way to do this!
    I have to make our video engineering dept. two separate files, one containing the EVEN rows of pixels, and one file with the ODD rows of pixels.
    BUT, I have to collapse the space between each pixel row, truncating the file height in half.
    I have produced two master PSD files now, 854x480 WVGA format. I created a grid of selections (saved as an alpha channel) for ODD rows and EVEN rows, and deleted the unnecessary rows. If you were to layer these two files together, the image would appear seamlessly.
    OK, fine. I almost have what I want, but I'm not done yet.
    What I have to do now is to remove the space between each pixel row (the transparent rows), truncating the file height to 240 pixels high.
    Yes, I know the final image will appear "odd", but this is for technology development purposes.
    Can anyone offer a procedure to remove the rows of transparent pixels, resulting in a shorter file height?
    I could post a PSD, I suppose, if someone wanted to see what I'm starting with.
    If each pixel row were on an individual layer, I could distribute the layers, one on top of the other. But moving each pixel row would mean 240 layers.
    There has to be another way.
    I'm thinking there might be a method of doing this in AE if I can't do this in PS.
    Thanks so much.

    Tom:
    I would process one file at a time, creating even and odd files, as opposed to breaking out two files using masks (as you seem to describe) and then processing those. I'm 95% sure you can action this to a batchable action (serial numbered even/odd files, not filename-prefix, if that makes sense). When creating the 239 dupes: dupe one set, then select both sets, dupe both, then select four, dupe those and so on. Do this in a blank action to make it easy to determine what you're duping. I created an action with 1024 sets of steps this way, which is more than enough to process both even/odd files, link everything, copy merged, save out, etc. If you're using CS3 the linking is much more simple: link layers 1 through 240 selecting all, vs: select layer 1, layer 2, layer 3, ...
    If you merge linked and copy to a new file called "odd," then when you batch the action you can create 001_odd.psd, 001_even.psd, 002_odd.psd, 002_even.psd, ... Get the receiver to sign off on receiving renamed files and then no handwork for you. Or bug the scripting folks in that forum and they might be able to help you with naming the resultant files based on original.
    J

  • Is there an easy way to batch rename existing images in a folder?

    Hi,
    I discovered that I had accidentally imported several folders with the wrong filename prefix. I use the first three letters so it corresponds to the camera I shot it with, the program I exported it from, or the person who sent it to me. The last source, essentially.
    Is there an easy way I am not seeing in LR to rename all the images in a shoot without having to reimport them?
    Thanks,
    Chris

    Hightlight all of the images in the folder, press F2, and set up a renaming preset to your taste, and then apply it. Note that the preset mechanism is the same one used at import.

  • Keywords not sticky between imports

    When importing images, the filename prefix, image number, directory, and other attributes are "sticky" between imports (they're remembered so you don't have to enter them again for the subsequent import), however the keywords aren't remembered.  I'd suggest they should, just as the other attributes are.  Wandering through the discussions, it appears the import dialog keyword field was sticky in 2009.  Did it change or is there an options setting somewhere I can't find that would toggle this behavior?

    Tou can create "sticky' keywords by creating an Import Preset.
    Write as many keywords as you need into the keyword field of the Import Dialog and hit <Enter>.
    Then at the bottom center of the Import Dialog is the Import Preset Editor. See screen shot:
    It's a bit dark down there but if you look closely you see it.
    Click on the small double-triangle on the right and select <Save current settings as new preset> and give it a name.
    Then later on you only need to select this preset and your keywords will be applied to this import.
    BTW: You also can save other settings in yhe Import Dialog as a preset - for instance Develop Presets.

  • Problems With Archiso Scripts

    I've been getting this message recently when executing the build script in the releng profile of archiso. This happens even with an unmodified source.
    Here's the error:
    sed: can't read /home/bran/archlive/build.sh/pacman.conf: Not a directory
    Here's the code that causes this error:
    # Setup custom pacman.conf with current cache directories.
    make_pacman_conf() {
    local _cache_dirs
    _cache_dirs=($(pacman -v 2>&1 | grep '^Cache Dirs:' | sed 's/Cache Dirs:\s*//g'))
    sed -r "s|^#?\\s*CacheDir.+|CacheDir = $(echo -n ${_cache_dirs[@]})|g" ${script_path}/pacman.conf > ${pacman_conf}
    Variable Definitions
    pacman_conf=${work_dir}/pacman.conf
    script_path=$(readlink -f ${0%/*})
    work_dir=/home/bran/archlive/work
    If I comment out that sed expression it continues until it tries to build the ISO, so it actually seems like it's a problem with the script_path variable, considering the output from stdout
    grep: /home/bran/archlive/build.sh/packages.both: Not a directory
    grep: /home/bran/archlive/build.sh/packages.i686: Not a directory
    [mkarchiso] ERROR: Packages must be specified
    usage mkarchiso [options] command <command options>
    Essentially what I'm getting from this is that it thinks my script path is /home/bran/archlive/build.sh/ instead of just /home/bran/archlive/
    Any idea on how to fix this so that it can be submitted to the archiso-git maintainer?
    Last edited by brando56894 (2013-11-13 06:08:03)

    You want me to paste the output of help??
    [bran@ra ~/archlive]$ sudo bash build.sh -h
    usage build.sh [options]
    General options:
    -N <iso_name> Set an iso filename (prefix)
    Default: archlinux
    -V <iso_version> Set an iso version (in filename)
    Default: 2013.11.12
    -L <iso_label> Set an iso label (disk label)
    Default: ARCH_201311
    -D <install_dir> Set an install_dir (directory inside iso)
    Default: arch
    -w <work_dir> Set the working directory
    Default: work
    -o <out_dir> Set the output directory
    Default: out
    -v Enable verbose output
    -h This help message
    Your suspicion seems to be correct, but do you know why? I'm curious.
    [bran@ra ~]$ cp -r /usr/share/archiso/configs/releng .
    [bran@ra ~]$ cd releng/
    [bran@ra ~/releng]$ sudo bash build.sh -v
    sed: can't read /home/bran/releng/build.sh/pacman.conf: Not a directory
    [bran@ra ~/releng]$ sudo ./build.sh -v
    [mkarchiso] INFO: Configuration settings
    [mkarchiso] INFO: Command: init
    [mkarchiso] INFO: Architecture: i686
    [mkarchiso] INFO: Working directory: work/i686
    [mkarchiso] INFO: Installation directory: arch
    [mkarchiso] INFO: Pacman config file: work/pacman.conf
    [mkarchiso] INFO: Installing packages to 'work/i686/root-image/'...
    ==> Creating install root at work/i686/root-image
    ==> Installing packages to work/i686/root-image
    :: Synchronizing package databases...
    core 106.8 KiB 380K/s 00:00 [############################################################] 100%
    ^Cxtra 849.6 KiB 735K/s 00:00 [##################################--------------------------] 57%
    Interrupt signal received

  • Log API: daily roling file appender?

    my task is to replace Log4J with the JDK 1.4 logging API. how can i configure the logging to have a FileHandler that does daily rolling (like Log4J DailyRollingFileAppender) and offer a a date pattern for the file name (like Log4J DatePattern)?
    the result should be that each day, a new log file is created with the old files having a datepattern in the file names.

    Well, i wrote my own now, that supports time rolling (day, week, month, year) and later additional rollings. here's a start:
    import java.io.*;
    import java.text.SimpleDateFormat;
    import java.util.*;
    import java.util.logging.*;
    * File handler that supports different kind of rolling than java.util.logging.FileHandler.
    * Supported rolling methods are: by date (day).
    * <p>
    * Example of entries in the logging file (system property "java.util.logging.config.file"):
    * <p>
    <table align="center" bgcolor="#ddddff" border=1 cellpadding="10" cellspacing="0"><tr><td><pre>
    logging.RollingFileHandler.level = FINEST
    logging.RollingFileHandler.prefix = MyApp_
    logging.RollingFileHandler.dateFormat = yyyyMMdd
    logging.RollingFileHandler.suffix = .log
    logging.RollingFileHanlder.cycle=day
    logging.RollingFileHandler.formatter = java.util.logging.SimpleFormatter
    </pre></td></tr></table>
    <p>
    * @version $Revision:$ ($Date:$)
    * @author $Author:$
    public class RollingFileHandler extends StreamHandler {
        /** File prefix. */
        private static String prefix = null;
        /** Date format to use in file name. */
        private static String dateFormat = "yyyy-MM-dd"; //default
        /** File suffix. */
        private static String suffix = null;
        /** Time in milliseconds for the next cycle */
        private static long nextCycle = 0;
        /** Time cycle (for file roling) */
        private static String cycle = "day"; //default
         * Constructor.
        public RollingFileHandler() {
            super();
            LogManager manager = LogManager.getLogManager();
            String className = RollingFileHandler.class.getName();
            prefix = manager.getProperty(className + ".prefix");
            String dfs = manager.getProperty(className + ".dateFormat");
            suffix = manager.getProperty(className + ".suffix");
            String c = manager.getProperty(className + ".cycle");
            String formatter = manager.getProperty(className + ".formatter");
            if (dfs != null) {
                dateFormat = dfs;
            if (c != null) {
                if (c.equalsIgnoreCase("day") || c.equalsIgnoreCase("week") || c.equalsIgnoreCase("month") || c.equalsIgnoreCase("year")) {
                    cycle = c;
            if (formatter != null) {
                try {
                    setFormatter((Formatter) Class.forName(formatter).newInstance());
                } catch (Exception e) {
                    e.printStackTrace(System.err);
            openFile();
        }//RollingFileHandler()
          * Open existing or create new log file.
         private synchronized void openFile() {
            //create file name:
            String dateString = dateFormat; //default (to note error in file name)
            Date currentDate= new Date();
            try {
                SimpleDateFormat sdf = new SimpleDateFormat(dateFormat, Locale.getDefault());
                dateString = sdf.format(currentDate);
            } catch (IllegalArgumentException iae) {
                /* ignore wrong date format */
            //compute next cycle:
            Date nextDate = null;
            GregorianCalendar gc = new GregorianCalendar();
            gc.setTime(currentDate);
            if (cycle.equalsIgnoreCase("week")) {
                gc.add(Calendar.WEEK_OF_YEAR, 1);
                nextDate = gc.getTime();
            } else if (cycle.equalsIgnoreCase("month")) {
                gc.add(Calendar.MONTH, 1);
                int month = gc.get(Calendar.MONTH);
                int year = gc.get(Calendar.YEAR);
                GregorianCalendar gc2 = new GregorianCalendar(year, month, 1);
                nextDate = gc2.getTime();
            } else if (cycle.equalsIgnoreCase("year")) {
                gc.add(Calendar.YEAR, 1);
                int year = gc.get(Calendar.YEAR);
                GregorianCalendar gc2 = new GregorianCalendar(year, 0, 1);
                nextDate = gc2.getTime();
            } else { //day by default
                gc.add(Calendar.DAY_OF_MONTH, 1);
                nextDate = gc.getTime();
            //to zero time:
            gc = new GregorianCalendar();
            gc.setTime(nextDate);
            gc.set(Calendar.HOUR, 0);
            gc.set(Calendar.HOUR_OF_DAY, 0);
            gc.set(Calendar.MINUTE, 0);
            gc.set(Calendar.SECOND, 0);
            gc.set(Calendar.MILLISECOND, 0);
            nextDate = gc.getTime();
            nextCycle = nextDate.getTime();
            //create new file:
            String fileName = prefix + dateString + suffix;
            File file = new File(fileName);
            //create file:
            if (!file.exists()) {
                try {
                    file.createNewFile();
                } catch (IOException ioe) {
                    ioe.printStackTrace(System.err);
            //set log file as OutputStream:
            try {
                FileOutputStream fos = new FileOutputStream(file, true);
                setOutputStream(fos);
            } catch (FileNotFoundException fnfe) {
                reportError(null, fnfe, ErrorManager.OPEN_FAILURE);
                fnfe.printStackTrace(System.err);
                setOutputStream(System.out); //fallback stream
        }//openFile()
         * Overwrites super.
        public synchronized void publish(LogRecord record) {
            if (!isLoggable(record)) {
                return;
            super.publish(record);
            flush();
            //check if we need to rotate
            if (System.currentTimeMillis() >= nextCycle) { //next cycle?
                role();
        }//publish()
          * Role file. Close current file and possibly create new file.
         final private synchronized void role() {
            Level oldLevel = getLevel();
            setLevel(Level.OFF);
            super.close();
            openFile();
            setLevel(oldLevel);
        }//rotate()
    }//RollingFileHandler

Maybe you are looking for

  • No errors but no sound output . Help !

    Dear Java People, I have a program that has a good look with buttons but the sound actionPerformed() play() sound does not work. Below is the coding and below that is the original version Thank you in advance Norman import java.util.*; import java.aw

  • CRVS2010 Beta - Missing parameter values

    I want to export my report to pdf file and I want to set some parameters in report in runtime. But when I try to do it I have exception "Missing parameter values". Productversion: Visual Studio 2010 + Crystal Report 2008 + service pack v3. I read tha

  • How to convert a .jsp page in to the .txt page with a click of the button

    Hi Sir, Here the main thing is that in order to print a web page(.jsp page) in dotmatrix printer i need to first convert that webpage (.jsp page) in to .txt page.But my doubt is that can you convert a .jsp page in to .txt page with a click of a butto

  • Passing Values to search strings, odd behavior

    Greetings, I've encountered an issue in a script of mine while trying to repair a search function that is boggling my mind, I'm hoping for some expert opinion as to why this is happening and what I may be missing here. In short, I'm trying to add a f

  • Im so confuse

    I did the recovery mode thing, and it wont get out of recovery mode... how do you do that? (by the way I'm using a 5 gig Zen Micro.)