Filename Rename Problem

Hi all,
My problem is sometime i cant rename the filename with my program. For examp
le, before i edit the content of particular file, the filename is file_01.xm
l, then after i edit it and click the save button, i want to rename the file
name to file_01_edited.xml. So, sometime it work but sometime not.
Below is my some coding. Anybody can help me? !0s first.....
String nfilename = tokenString[0] + "_edited";
File original = new File(directoryname + "\\" + "original" + "\\" + tokenStr
ing[0] + ".txt");
File noriginal = new File (directoryname + "\\" + "original" + "\\" + nfilen
ame + ".txt");
boolean success1 = original.renameTo(noriginal);
File process = new File(directoryname + "\\" + "process" + "\\" + tokenStrin
g[0] + ".xml");
File nprocess = new File (directoryname + "\\" + "process" + "\\" + nfilenam
e + ".xml");
boolean success2 = process.renameTo(nprocess);
File edit = new File(directoryname + "\\" + "edit" + "\\" + tokenString[0] +
".xml");
File nedit = new File(directoryname + "\\" + "edit" + "\\" + nfilename + ".x
ml");
boolean success3 = edit.renameTo(nedit);

Can u explain more clearly.....? or can u have any
example?If they are collection of text lines ...
String newFileName = "tokenString[0] + "_edited";
PrintWriter pw = new PrintWriter(new BufferedWriter(new FileWriter(newFileName)));
// use pw.println() for line output

Similar Messages

  • File Export Renaming Problem

    I want to export collections of files from Lightoom.
    I want to rename the newely exported files, but I want to use the same file number suffix as the original file.
    I also want to embed the oringal file name in the metadata of the newly exported file.
    The problem is that, when I go into the File->Export dialog i.e. the "Filename Template Editor" the orginal  "file number suffix" is not showing up in what would be the newly created filename. The orginal file number suffix does not appear to be part of the metadata.
    The current filename on disk does however have the file number suffix as part of the name.
    However it does not seem possible to extract part of the current file name (i.e. the number suffix) on export.
    If I rename the files using a number sequence then adding or removing a file will change the sequence on subsequent exports of the collection.
    (Not something I want to do, since it would then be difficult to keep track of the images used originate the exported file, if I updated the collection.)
    Renaming all my original files is not a viable option since there are too many of them and different exported files may be in more than one collection.
    *Any suggestions as to how to get the file naming I want for the exported files, i.e. "placename-oringal file number suffix"?
    (Given the file number suffix is missing from the metadata)
    *Also I would like to include the existing file name in the metadata of any new file name.
    Any suggestions on how to automate this?

    John said:
    > Unless you check "minimize metadata", it should all be there.
    No I have not checked this box.
    > Second, if you rename your files just before you Export (and not in the Export dialog, but actually rename them by batch
    > so the LR name is changed) you'll be able to link them up to the originals much more easily.
    No this will not work.  My naming method is quite useful for me, but not useful for potential buyers.
    When I export collections I want to simplify the names.
    > Third, the rename editor is pretty flexible.
    Yes I know, usually it is sufficient, but in this case it does not do what I want.
    > Finally, all the metadata is there, and searching is much easier via it rather than a complex naming convention
    > (not that it's so complex, but getting there may be.
    Not sure I completely agree here.  My naming method works quite well for organising images and for processing and so on.
    Now since I have collections spanning multiple directories and so that I want to export the files with a simplified filename.
    I expected to be able to do this using the file name editing template.
    The BreezeBrowser renamer is much more flexible than the Lightroom filename template editor, so I may end up using that.
    However it will be messy and add a few extra steps. i.e. export to a new directory using the existing filename.  Then use Breezebrowser to rename the files by extracting the "file number suffix" from the original filename and making sure there is sufficient information in the new filename to create a one-to-one mapping.  Then upload the new files to the website.
    I stil don't see how to get the original file name into the metadate of the new filename though?l
    Really I should be able to do all this in Lightroom.

  • Serious File Import / Renaming Problem for Professional Photographer

    I'm a professional photographer who imports thousands of photos from several CF cards from several photographers using several different brands of cameras. I recently came across the following problem.
    CASE #1: If you import a CR2 and a NEF file into the same directory, both with the same capture time, in two different import processes, and rename them at the time of import to the capture time of HHMMSS, then you end up with two files in the same directory with the same filename and different extensions. This is a big problem. It's common to have two photographers shooting with two different camera brands at big events. When this renaming issue happens, and those filenames remain the same, only a single XMP file is ever written. Additionally, only a single JPG can be generated from the RAW file; one will overwrite the other.
    CASE #2: If you import a CR2 and a NEF file into the same directory, both with the same capture time, in a single import process from a local drive, and set the import to rename the files at the time of import to the capture time of HHMMSS, then you end up with an error message that states that neither file can be renamed. I haven't hit this in my environment but I uncovered it in my testing for this issue.
    CASE #3: If you rename a CR2 and a NEF file in the same directory, both with the same capture time but with different file names, and set the Library > Rename Photos... process to use the capture time of HHMMSS, then the files will be renamed properly, except one of the files will automatically have a “-1” appended to it (prior to the differing extension). This is the way I think it should work for both CASE #1 and CASE #2.
    I only just now discovered this problem. I'm not sure it was present on previous releases but if so, I'm scared to think of how many files were never exported as JPGs to my customers. In the last event that I processed, I discovered 20 photos (40 files) that were shown to exhibit this problem.
    How do I get this addressed by Adobe? I don't want to use the Rename function after every muliple card import just to work around this problem!

    RobGreerPhotography wrote:
    It sure does feel like you're trolling here. Given the fact  that I successfully manage over 100,000 client images annually and I've been  successfully following this naming convention for the last six years, I  think I know a little bit about how I need to go about manaing my own  files. File naming is key component of my DAM and my office automation.  Until you've walked in my shoes for a few years, you can't speak to the  best way to run my business or my file management. Well, you can, but  you'd probably be wrong.
    My comments were definitely not "trolling", unless you mean I had a hook in the water looking for a bite. In which case: success!
    You may have all the reason in the world to think your way is the best, but the more you explain it, the less I am convinced. Even pros have to reconsider less ideal workflows. In fact, it is often pros that insist on sticking to old busted workflows that were crafted around earlier, less capable tools.
    And, yes, depending primarily on a filename created at import (before you have even looked at the images) for the core of your DAM workflow is, well, not DAM. Your blunt, and yet strangely constricted, file-naming pattern is obviously not really helping you, and yet your first response is to blame the tool. There is a famous platitude in there somewhere.
    There is a lot of good advice else-thread. You should at least heed some of it. Because the /combined/ experience here will always exceed personal experience.
    You have been given a lot of good workarounds for your situation, and gentle advice to consider how image metadata can be used post-import in a more nuanced manner, as well as a place to raise a feature request.
    It isn't trolling to point out that none of this seems to satisfy you, and it appears to be because some folks are not immediately agreeing whole-heartedly with you.  But you are welcome to take what you want, if anything, from my comments.

  • Bulk Renaming Problem in Adobe Bridge

    Hi
    I have an inconvenient problem in bulk renaming files in Adobe Bridge CS3.
    An original file name for example looks like: DSC_5521
    I wish to keep the "5521" part in my bulk renaming process so it may look for example like "Landscape5521" but loose the "DSC_" bit of the original file name.
    Bulk renaming appears to let me keep all the original file name or none of it. In which case I have to manually knock out the "DSC_" part of each renamed file.
    Any suggestions or ideas would be gratefully received!
    Many thanks
    Carl

    Carl,
    While Bridge's renaming abilities is adequate in some post-production digital workflows it fails in the industrial grade categories.
    For a simple no fuss approach I have for many years now used free-ware software.  If you look around on the Internet you should be able to find a renaming program that will suit your needs.  Most of them are small and unobtrusive in their use and computer requirements.  Myself I am quite satisfied with Smart Rename 1.0 by ZByteSoft.Com.
    I regularly rename, and apply or change date stamps, for up to 4,000 files at a time.  I am also able to apply system attributes to the selected files as I desire.
    While such programs may not give you exactly what you wish they should come close.  It may require that you slightly change your digital workflow and in that regard you may find that one little application that suits your needs to a tee.
    Wayne Webb

  • Renaming problem in in windows 7

    Problem with renaming in Windows 7. Created a folder, then renamed it to a name. when i pressed enter, 42 other random files and folders on my desktop got the same name. Does anyone know anything about this?

    Problem with renaming in Windows 7. Created a folder, then renamed it to a name. when i pressed enter, 42 other random files and folders on my desktop got the same name. Does anyone know anything about this?
    can you post a screen shot of the problem
    Corsair Carbide 300R with window
    Corsair TX850V2 70A@12V
    Asus M5A99FX PRO R2.0 CFX/SLI
    AMD Phenom II 965 C3 Black Edition @ 4.0 GHz
    G.SKILL RipjawsX DDR3-2133 8 GB
    EVGA GTX 6600 Ti FTW Signature 2(Gk104 Kepler)
    Asus PA238QR IPS LED HDMI DP 1080p
    ST2000DM001 & Windows 8.1 Enterprise x64
    Microsoft Wireless Desktop 2000
    Wacom Bamboo CHT470M
    Place your rig specifics into your signature like I have, makes it 100x easier to understand!
    Hardcore Games Legendary is the Only Way to Play!

  • File Sender Filename scheme problem

    Hello,
    we need to pick two types of files from the same folder on FTP server:
    Examples of filenames are:
    FILEINVRPT12_28102010.xml  and  FILESLSRPT12_28102010.xml
    We tried to use Advanced selection of files for these two file types and the filename scheme used was
    FILEINVRPT.xml in filename and FILESLSRPT.xml in Filename mask for Advanced selection
    All files of type FILEINVRPT.xml  have been picked up but FILESLSRPT.xml were not.
    We tried to remove advanced selection and even used *.xml and . as filename scheme ,still these files aren't picked up.
    Then we tried giving exact filename (hardcoded) for some of these files and they were picked up ,so there should be no problem with these files.
    Can anyone please suggest what could be the reason for this strange behaviour?
    Thanks a lot.
    Best Regards,
    Shweta

    Hi Shwetha,
    As per my understanding, you need to pick two different files(not having same naming convension) from the same folder. I see that you are using Advanced selection for Source files.
    This can be easily achieved, I have done it and providing you the steps to configure the adapter.
    1. In the File Access parameters, provide the source directory and filename as FILE*.xml.
    2. Now, check the option, advanced selection for source files.
    provide the directory = 10.20.30.40
    and the File Name Mask FILEINVRPT.xml, FILESLSRPT.xml
    Ensure that the file placed in the FTP should have the same naming convension of the filename.
    Thanks,

  • Filename space problem

    I have Iplanet web server(iws, 6.0 SP4) talking with weblogic 6.1 (using NSAPI plug-in). the request reaches iws and is internally redirected to weblogic. the problem i have is that there is a folder in weblogic which has spaces in filenames.
    When I try to access any file having spaces through Iplanet having spaces, the Get call only encodes URI with the letters of the filename till the first space and I get error back. The same problem is not seen when I access through Weblogic. Is there a know problem with Iplanet when spaces occur in URI?. how to resolve it

    Is the problem in the GET request sent to iWS or in the GET request sent from iWS to WebLogic? If it's the former, make sure the URL is properly encoded in the referring page. If it's the latter, the problem is a defect in the WebLogic NSAPI plugin.

  • File Renaming Problem

    I'm having a problem with renaming some videos that I downloaded after upgradeing to 10.6. When I was using Leopard, it worked fine. When I try to rename files by pressing Enter or doing two clicks to allow me to rename them, nothing happens. I can't even change it by opening the Get Info menu and selecting the Name and Extension portion. the name is greyed out. I can only change it with Terminal. Has anyone else experienced this problem?

    HI,
    Repair disk permissions.
    Quit any open applications/programs. Launch Disk Utility. (Applications/Utilities) Select MacintoshHD in the panel on the left, select the FirstAid tab. Click: Repair Disk Permissions. When it's finished from the Menu Bar, Quit Disk Utility and restart your Mac. If you see a long list of "messages" in the permissions window, it's ok. That can be ignored. As long as you see, "Permissions Repair Complete" when it's finished... you're done. Quit Disk Utility and restart your Mac.
    Carolyn

  • Rename problems in KM

    hi,all
    1
    is there such an operation like "copy as" ?
    then i can rename the file while pasting it.
    can i make some configration in "User Interface" or somewhere to do this?
    2
    when i new a file from template, in the folder "userhome" it allows me to rename the new file, but in the other folders it has only two button("save" & "cancel").
    how to rename the new file each time i "new from template" ?
    thx.

    Hi,
    If you are talking about the File Upload view then :
    I don't think there is any such option available in standard KM.
    You can modify the UI for uploading files to KM using APIs.
    I am sure there you can customise and have this option available.
    Please see this blog:https://www.sdn.sap.com/irj/sdn/weblogs?blog=/pub/wlg/1750
    This blog takes the filename and path at runtime.
    Regards,
    Sumit

  • Apple Mail long russian filename attachment problem

    Hi,
    The problem is that Mail.app set incorrect filename for attachment. I have gmail account and set up Mail.app as IMAP client. Most attachments are correct, but sometimes they come with bad names.For example:
    In  gmail account (web) everything is ok:
    The problem is that Mail.app set another filename, set up KOI-8 and instead of having one name=".....", we have name*0, name*1, name*2
    In gmail:
    Content-Type: application/vnd.openxmlformats-officedocument.wordprocessingml.document;
              name="=?UTF-8?B?0KTRg9C90LrRhtC40L7QvdCw0LvRjNC90YvQtSDRgtGA0LXQsdC+0LLQsN C90LjRjyDQuiDQpNCe?=
              =?UTF-8?B?0J8gLSDQstGL0LHQvtGAINC/0YDQvtC00YPQutGC0LAg0Lgg0L/QvtC70Y8g0LrQ vtGC0L7RgNGL0LUg?=
              =?UTF-8?B?0L7RgdGC0LDRjtGC0YHRj192NC0xLmRvY3g=?="
    Content-Disposition: attachment;
              filename="=?UTF-8?B?0KTRg9C90LrRhtC40L7QvdCw0LvRjNC90YvQtSDRgtGA0LXQsdC+0L LQsNC90LjRjyDQuiDQpNCe?=
              =?UTF-8?B?0J8gLSDQstGL0LHQvtGAINC/0YDQvtC00YPQutGC0LAg0Lgg0L/QvtC70Y8g0LrQ vtGC0L7RgNGL0LUg?=
              =?UTF-8?B?0L7RgdGC0LDRjtGC0YHRj192NC0xLmRvY3g=?="
    Content-Transfer-Encoding: base64
    X-Attachment-Id: f_hg876ra80
    In Mail.App
    Content-Disposition: ATTACHMENT;
              filename*0="=?KOI8-R?B?5tXOy8PJz87BzNjO2cUg1NLFws/Xwc7J0SDLIObv8CAtINfZws/ SI";
              filename*1="NA=?= =?KOI8-R?B?0s/E1cvUwSDJINDPzNEgy8/Uz9LZxSDP09TBwNTT0V92NC0";
              filename*2="xLmRvY3g=?="
    Content-Type: APPLICATION/VND.OPENXMLFORMATS-OFFICEDOCUMENT.WORDPROCESSINGML.DOCUMENT;
              name*0="=?KOI8-R?B?5tXOy8PJz87BzNjO2cUg1NLFws/Xwc7J0SDLIObv8CAtINfZws/SI";
              name*1="NA=?= =?KOI8-R?B?0s/E1cvUwSDJINDPzNEgy8/Uz9LZxSDP09TBwNTT0V92NC0";
              name*2="xLmRvY3g=?="
    Content-Transfer-Encoding: BASE64

    BUG!!!
    Here is. Mail.app converts filename into KOI8-R, but it doesn't change encoding for section (in this message - -047d7bb03fd6ab743004dbbf6ccd)
    MIME-Version: 1.0
    Received: by 10.49.61.129 with HTTP; Thu, 2 May 2013 10:18:35 -0700 (PDT)
    Date: Thu, 2 May 2013 21:18:35 +0400
    Delivered-To: [email protected]
    Message-ID: <[email protected]m>
    Subject: TEST
    From: "Paul M. Tarasov" <[email protected]>
    To: "Paul M. Tarasov" <[email protected]>
    Content-Type: multipart/mixed; boundary=047d7bb03fd6ab743304dbbf6ccf
    --047d7bb03fd6ab743304dbbf6ccf
    Content-Type: multipart/ALTERNATIVE;
              boundary=047d7bb03fd6ab743004dbbf6ccd
    --047d7bb03fd6ab743004dbbf6ccd
    Content-Transfer-Encoding: BASE64
    Content-Type: TEXT/PLAIN;
              charset=UTF-8
    LS0gDQrQn9Cw0LLQtdC7DQo=
    --047d7bb03fd6ab743004dbbf6ccd
    Content-Transfer-Encoding: QUOTED-PRINTABLE
    Content-Type: TEXT/HTML;
              charset=UTF-8
    <div dir=3D"ltr"><br clear=3D"all"><div><br></div>-- <br><font face=3D"verd=
    ana, sans-serif">=D0=9F=D0=B0=D0=B2=D0=B5=D0=BB</font>
    </div>
    --047d7bb03fd6ab743004dbbf6ccd--
    --047d7bb03fd6ab743304dbbf6ccf
    Content-Disposition: ATTACHMENT;
              filename*0="=?KOI8-R?B?5tXOy8PJz87BzNjO2cUg1NLFws/Xwc7J0SDLIObv8CAtINfZws/SI";
              filename*1="NA=?= =?KOI8-R?B?0s/E1cvUwSDJINDPzNEgy8/Uz9LZxSDP09TBwNTT0V92NC0";
              filename*2="xLmRvY3g=?="
    Content-Type: APPLICATION/VND.OPENXMLFORMATS-OFFICEDOCUMENT.WORDPROCESSINGML.DOCUMENT;
              name*0="=?KOI8-R?B?5tXOy8PJz87BzNjO2cUg1NLFws/Xwc7J0SDLIObv8CAtINfZws/SI";
              name*1="NA=?= =?KOI8-R?B?0s/E1cvUwSDJINDPzNEgy8/Uz9LZxSDP09TBwNTT0V92NC0";
              name*2="xLmRvY3g=?="
    Content-Transfer-Encoding: BASE64
    It must be KOI8-R
    MIME-Version: 1.0
    Received: by 10.49.61.129 with HTTP; Thu, 2 May 2013 10:18:35 -0700 (PDT)
    Date: Thu, 2 May 2013 21:18:35 +0400
    Delivered-To: [email protected]
    Message-ID: <[email protected]m>
    Subject: TEST
    From: "Paul M. Tarasov" <[email protected]>
    To: "Paul M. Tarasov" <[email protected]>
    Content-Type: multipart/mixed; boundary=047d7bb03fd6ab743304dbbf6ccf
    --047d7bb03fd6ab743304dbbf6ccf
    Content-Type: multipart/ALTERNATIVE;
      boundary=047d7bb03fd6ab743004dbbf6ccd
    --047d7bb03fd6ab743004dbbf6ccd
    Content-Transfer-Encoding: BASE64
    Content-Type: TEXT/PLAIN;
      charset=KOI8-R
    LS0gDQrQn9Cw0LLQtdC7DQo=
    --047d7bb03fd6ab743004dbbf6ccd
    Content-Transfer-Encoding: QUOTED-PRINTABLE
    Content-Type: TEXT/HTML;
      charset=UTF-8
    <div dir=3D"ltr"><br clear=3D"all"><div><br></div>-- <br><font face=3D"verd=
    ana, sans-serif">=D0=9F=D0=B0=D0=B2=D0=B5=D0=BB</font>
    </div>
    --047d7bb03fd6ab743004dbbf6ccd--
    --047d7bb03fd6ab743304dbbf6ccf
    Content-Disposition: ATTACHMENT;
      filename*0="=?KOI8-R?B?5tXOy8PJz87BzNjO2cUg1NLFws/Xwc7J0SDLIObv8CAtINfZws/SI";
      filename*1="NA=?= =?KOI8-R?B?0s/E1cvUwSDJINDPzNEgy8/Uz9LZxSDP09TBwNTT0V92NC0";
      filename*2="xLmRvY3g=?="
    Content-Type: APPLICATION/VND.OPENXMLFORMATS-OFFICEDOCUMENT.WORDPROCESSINGML.DOCUMENT;
      name*0="=?KOI8-R?B?5tXOy8PJz87BzNjO2cUg1NLFws/Xwc7J0SDLIObv8CAtINfZws/SI";
      name*1="NA=?= =?KOI8-R?B?0s/E1cvUwSDJINDPzNEgy8/Uz9LZxSDP09TBwNTT0V92NC0";
      name*2="xLmRvY3g=?="
    Content-Transfer-Encoding: BASE64

  • Renaming problem

    Im on a trip, working off my Mac laptop with LR 1.1. Id like to import all my shots (RAW, imported as .dng) and JPEGs from a different camera) into one folder for the trip. I started the trip fresh with no photos in the catalog.
    Ive run into problems in which LR will stop renaming all the shots in a folder, say that one shot cant be renamed, and I cant continue until I click o.k. So I may have 763 shots in a folder, but it will end with say, 762 as the final shot.
    Ive tried exiting LR, renaming the shots in Photo Mechanic, but that seems to cause problems then when I access them in LR.
    Ive deleted all the shots from the catalog and reimported from my backup files on my external hard drive. But the problem remains with not being able to rename some shots.
    Cause and cure for this?

    You could try using the Adobe DNG Converter application (free download from Adobe) to first convert and rename all of your RAW files to DNG. Then import the DNG's into LR. I've also had problems renaming DNG's in LR after importing from a card. So now I use the DNG Converter to convert my Canon CRW files into DNG... I don't use LR's import/convert to DNG feature, there seems to be a bug in how it is converting RAW to DNG upon import from a card. Hope this helps.

  • Filename sorting problem (acrobat)

    Hi
    I have a Adobe CS4 (Acrobat, Illustrator, Photoshop etc). The problem is that the filenames listed  in Open File window (does not matter what you I click 'Open File' icon,  go to Menu - Open, or Crtl+O) are always sorted in Descending order. I want them to be sorted Ascending and to get it that way I have to change the View to Table, Click on Column header to re-sort them. This happens in all CS4 application and really makes my life difficult because I cant change the way it sorts files. What I tried so far without any luck:
    - changed sorting in Open File window within Acrobat, but it does not remember that
    - did previous operation running Acrobat as local Admin
    - changed the sorting in Windows Explorer, does not affect Acrobat
    I will appreciate if anyone let me know how to fix this problem,
    Lance

    apparently it was not an Adobe, but Windows issue. I found a fix and want to share it with others:
    ===============================================================================
    Somehow or another, the sort order of the files can get changed in the
    File Open Dialog Box, as well as any other common dialog box that lists
    files based on the same control.
    It is maddenly difficult to find the fix for this using Google.
    Anyway, the fix:
    Right click My Computer, choose Explore.
    Click on the C: Drive in the left pane.
    Click on the View Menu, then choose List.
    Right click in the empty whitespace area in the right pane where the
    files get listed.
    Choose Arrange Icons By.
    Pick "Name".
    Verify files are sorted alphabetically. If not, repeat.
    Press and hold the control key, then click on the "X" to close
    Explorer.
    Then you can reopen explorer and set whatever default view you want in
    explorer.
    The key here, is that the file open dialog box, and all other similar
    controls, use the sort method saved when in "List" view. Nowhere else
    have I seen this. If you do it using "Details" view, it won't fix the
    dialog box sort order.
    I post this in the hopes that it might show up in a Google search the
    next time I screw it up and can't remember how to fix it.
    The above might only be true for my computer, but I have verified it,
    and finally squashed the little cockroach of a problem.
    ===============================================================================

  • Refactor - Renaming Problem Auto Code Generation

    After renaming the java source files (backing beans) to upper case letters (ex. from console.java to Console.java),
    JSC is not able to instantiate this class anymore, because the managed-bean.xml is altered automatically.
    The next problem is the jsp-file. JSC produces some useless code which points to the new (by JSC) created managed beans (old ones still exist)
    example (jsp):
    </ui:body>
    </ui:html>
    </ui:page>
    </f:view>
    <ui:body binding="#{request$console.body1}" id="body1"/>
    (managed-beans.xml)
    <managed-bean>
    <managed-bean-name>request$console</managed-bean-name>
    I�m not able to delete this generated code, because after saving and reloading the jsp-file the inserted code is still there.
    In the projects view my java source files are shown in small letters, even if the files are in upper case on the file system (explorer).
    I�m using Studio Creator 2 Update 1 (Build 060915)
    The project can only be deployed (exporting *.war in JSC) and executed when i change the file attributes to read-only after editing them with a standard text editor.
    Any suggestions?

    Hi Naveen,
    I found these two fms's which would enable automatic item code generation. See if it helps you.
    declare @temp as char(20)
    IF $[OITM.ItmsGrpCod] = 101
    BEGIN
    set @temp=(select isnull(max(right(ItemCode,4)),0) + 1 from OITM where (ItmsGrpCod= 101) and (len(ItemCode)=7))
    set @temp='DRM'+isnull(replicate(0,4-len(@temp)),'')+@temp
    select cast(@temp as char(20))
    END
    ELSE IF $[OITM.ItmsGrpCod] = 102
    BEGIN
    set @temp=(select isnull(max(right(ItemCode,4)),0) + 1 from OITM where (ItmsGrpCod= 102) and (len(ItemCode)=7))
    set @temp='PKG'+isnull(replicate(0,4-len(@temp)),'')+@temp
    select cast(@temp as char(20))
    END
    And:
    DECLARE
    @NUM AS CHAR(7)
    SET @NUM =
    (SELECT RIGHT(MAX(CardCode), 7) FROM OITM)
    SET @NUM = @NUM + 1
    BEGIN
    IF @NUM IS NULL OR @NUM = 0
    BEGIN
    SELECT 'I0000001'
    END
    IF @NUM < 10
    BEGIN
    SELECT 'I000000' + @NUM
    END
    IF @NUM > 9 AND @NUM < 100
    BEGIN
    SELECT 'I00000' + @NUM
    END
    ----COMPLETE THE CODE
    END
    Thanks,
    Joseph

  • Home folder/shortname rename problem

    So I've run into a bit of a problem with my home folder now. It started when I made my shortname something that I didn't want and so I tried to change it. I tried to do so in the finder side menu by just renaming it. Little did I know that this was the completely wrong way to go about it. I've tried to change it twice too before I really realized what was happening. So now in my Users folder, I have my short name main user folder as well as two other folders that are not associated with any user accounts. Upon making the switch each time, data moved to the new folder and is no longer in the original. The special windows on the left side menu of the finder window have also changed to default folder icons instead of the special music, movies, documents, and pictures icons.
    So basically, I need help restoring everything back to the way it was (one home folder in the Users folder) without losing any of the data that's in each of the new "home folders". Any help is greatly appreciated. Thanks.
    Geoff

    Hi,
    There is a much simpler way:
    Go to your finder
    Select Help
    Enter "Rename Home"
    Read the first Support Article
    Here is an extract of this article:
    - In the Finder, go to the /Users folder.
    - Locate the new home directory, which bears the users' short name.
    - Add "_new" to the new home directory's name.
    - Rename the old home directory to the user's correct short name.
    - Log out and back in with the affected user account.
    Hope that helps

  • Renaming problem on import

    I tried to create a renaming convention YYMMDD_Filename_CustomText.  Unfortunately, after creating the renaming profile, it just begins importing photos without ever asking what the CustomText should be.  All the photos imported then come in with "untitled" preplacing the CustomText area of the filename.
    Also, I've been loading lots of medium res jpeg photos off DVD in LR Beta 4.  They seem to be taking a really long time - much longer than expected.  12 per minute is all that I'm achieving.

    The import dialog will not prompt you for custom text. It leaves a dialog for you to type within at each import.  It is the Custom Text field in the File Renaming panel on the RH Side of the Import dialog.  If you do not fill in text, Lightroom will substitute "untitled".

Maybe you are looking for

  • Time Machine is going NUTS & so am I

    Aloha all. I have a problem that I can't find a solution to. I have set Time Machine to exclude any and all Aperture .( v2.1) files. Now Aperture won't start unless I have my external HD for Time Machine plugged into usb port, and turned on. If I eje

  • How to technically distinguish Shop on behalf and substitution

    Dear All, I am unable to distinguish ( by coding ) Shop on behalf and Substitution. Whenever I am doing Substitution, the approval list is showing Shop on behalf. Additionally the initial approver is not getting deleted. The substitute approver is ad

  • Missing data in server monitor under linux and solaris

    Some metrics are not displayed in our environments, specifically under the statistics tab, request statistics, active coldfusion thread, we always have a zero line.  Also under memory usage, "cf threads by memory usage" is always empty.  I have all t

  • My nano ipod will not do anything but flash the apple logo.  Help?

    I have tried ever diagnostic tool available. Have reset it many times. Have even done every troubleshooting thing it suggests to no avail. I just got it for Xmas and am very frustrated having spent all day yesterday trying to fix it.

  • Feature request - Export Draw files from Creative Cloud to Illustrator

    It's really annoying that you can't export Draw files from assets.adobe.com to Illustrator CC, that you have to do this from your iPad. If my battery is flat, or I have left my iPad somewhere I can only export REALLY crappy low res jpgs or pngs. Coup