Record of name change if condition apply

Hello

Is it possible to read the name of the file and rename if the condition applies.

Example:

We receive files bearing the name as shown below, I need the last 4 digits required to remove and save the .psd formate.

Some time we receive files with the last 4 digits and a few times it won't.

Source files:

4100520_A_799_0626.TIF

4100520_B_650_0626.PSD

4100520_B_400.TIF

41009782_B_039_0626.jpg

Required final as file names:

4100520_A_799.PSD

4100520_B_650.PSD

4100520_B_400.PSD

41009782_B_039.PSD

Hi all

Nice problem.

If you keep the first 13 characters of your file names, you can try this also:

MAC Finder or WINDOWS Explorer

#target photoshop

app.bringToFront ();

main();

main() {} function

Selection of the folder where the images have been copied

var inputFolder = Folder.selectDialog ("select the folder where your images were copied :");

var outputFolder = file (inputFolder + "/ Save");

If (! outputFolder.exists) outputFolder.create ();

List of files of the var = inputFolder.getFiles (/ \.) (jpg) | JPEG | TIF | TIFF | PSD |) $/i);

No comment

app.displayDialogs = DialogModes.NO;

If there are pictures in the folder

If (fileList.length > 0)

{

for (var i = 0; i)<>

{

docRef var = open (fileList [i]);

var Nomdoc = docRef.name;

docName var = docName.substring (0, docName.indexOf('.')); photo26 and photo43

var psd_Options = new PhotoshopSaveOptions(); [PhotoshopSaveOptions]

psd_Options.layers = true; preserve layers

psd_Options.embedColorProfile = true; Preserves color profile

psd_Options.annotations = true; preserves the notes

psd_Options.alphaChannels = true; preserve alpha channels

psd_Options.spotColors = true; preserves the inks

var shortName = leftTrim (docName);

Save

docRef.saveAs (file (outputFolder + ' /' shortName + ".psd"), psd_Options, true);

app.activeDocument.close (SaveOptions.DONOTSAVECHANGES);

}

}

Alert ("your files have been saved in the------"... / save\ "subfolder");

}

function leftTrim (name)

{

return name.substr (0.13)

}

Tags: Photoshop

Similar Questions

  • Description not changed for KEY, even if the name changes applied patch

    EBS 12.1.3 installed, and I try to install Russian localization following < R12 EMEA locations - CIS [ID 472418.1] module > document.

    So, first of all, I installed 8640014 (KEY: Adsplice for R12.1 (All RUPs of R12.1)), as is the condition sine qua non of 9350941.
    Then I installed 10164748 (change of name of Consulting EMEA locations' 'EMEA locations (9034879 replacement) module), as this is a postrequired of 8640014 patch.

    Both went ok without any error.

    However, when I continue with the installation of 9350941, GEN (R12.1 - KEY: Company Info package), he always complains about mismatching of the description below.

    - - - - -
    ...
    Reading patch file of the driver.

    Determine the version target...

    The current version of target is 12.1.3

    Caution:

    The description of the entity 'key' in the driver patch
    does not match the current description.

    The current description is: "EMEA Consulting locations.
    The description in the patch is: 'EMEA locations module.

    The current description will not be changed.

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    This basic patch contains files that may require translation
    According to the language currently installed.

    Oracle Corporation recommends that provide you translated versions of this
    patch for each of your languages other than the United States before applying this basic patch.

    The translated version of the patch should be applied immediately AFTER
    apply this hotfix to base.
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

    You do not want to apply this fix now [no]?

    You must check the file
    /D01/Oracle/SID/apps/apps_st/appl/Admin/SID/log/adpatch_9350941_GEN.log

    to find errors.
    - - - - -

    Then, I stopped by answering NO to the question.
    How does this happen? Shouldn't the name changed after the application of the patch 10164748?

    Hello

    This warning can be ignored.

    Please check

  • One more time: Houston-25014: the record has been changed by another user. Please try again.

    Hello

    JDev 11.1.2.4

    I have a workflow where I execute with params VO, and then navigate to a view activity. On this page fragment, I click on a button that calls a PL/SQL procedure in the module of the application. The proceduce updates a row in the table. After this method call, I navigate to the same run with params.

    Execute with params-> view activity method-> call-> Execute with params (the app module method)

    But I have an exceptional:

    oracle.jbo.RowInconsistentException < DCBindingContainer > < reportException > [2669]: Houston-25014: the record has been changed by another user. Please try again.

    at oracle.jbo.server.OracleSQLBuilderImpl.doEntitySelectForAltKey(OracleSQLBuilderImpl.java:1078)

    at oracle.jbo.server.BaseSQLBuilderImpl.doEntitySelect(BaseSQLBuilderImpl.java:552)

    at oracle.jbo.server.EntityImpl.doSelect(EntityImpl.java:8311)

    at oracle.jbo.server.EntityImpl.populate(EntityImpl.java:6975)

    In the log, I see the error.

    Compare entity < EntityImpl > < compare > [2305] has no attribute Addr1

    < EntityImpl > < compare > [2306] original value: COURTUPD

    Target value < EntityImpl > < compare > [2307]: COURTUPDfewfew

    The update in the procedure updates this field. The procedure performs validation, I made the call.

    I suspected that the case of ghost ADF so I put update on update for this field, but it does not work.

    Any idea on who is the user who changes my file without telling me?

    Thank you

    You have something in your entity that has changed.  Call rollback on your transaction module app before executeWithParams put it in a clean condition.

  • Breaking SMB permissions after the NAS host name change.

    Broken SMB permissions after the NAS host name change

    ReadyNAS 104 firmware 6.5.1

    Who can help me?

    I couldn't reach the NAS with Windows Explorer. Problem solved now.

  • Monthly automatic name change

    Hi guys, I worked on a VI that has done a number of things and one of them is that he writes to a file, a number of variables, my question is if anyone out there has tried an "automatic file name change"? For example, whenever changes in months the VI will automatically create a new file named after the month and writing of the variables in the boot file, in this way he used call even...

    Any ideas? Here's what I've done so now...

    Thank you!

    Hey Magb...

    I suggest you check out this example

    It teaches you how to change a file path programmatically according to the date that the data acquisition; It also uses a State of the machine do.

    This way you will have only one file per month even if your VI works with non-stop for 5 months straight...

    You would have to change to acquire your data and store it in the path you want, because it stores in 'My Documents'

    Good luck with your application

  • Error Impossible creatures: the resoucre you're looking could have been removed, had its name changed, or is temporairly unavailable

    original title: Impossible creatures

    did you remove the link to install the trial version impossible creatures, otherwise why he always say the resoucre you are looking for has been deleted, its name changed or is temporairly unavailable

    Try this site to download. I tried it and it works.

    http://games.Softpedia.com/get/games-demo/impossible-creatures-demo.shtml

  • I find these records long name with 20 or more charactors and inside them is nothing else than "mrt.exe" file. I find them in random places.

    Original title: MRT. EXE files are all over my computer.

    I find these records long name with 20 or more charactors and inside them is nothing else than "mrt.exe" file. I find them in random places on my drive c: and many of them on my external G drive in the root. A new appears approximately every three months.

    I know the mrt.exe is supposed to have something to do with the malicious software removal tool, so I don't want to just delete them and have a problem.

    Allen

    Hello

    Are you prevents the tool from running?

    See Q21 at the end of this article

    The Microsoft Windows malicious software removal tool helps remove specific and prevalent malicious
    software for computers running Windows 7, Windows Vista, Windows Server 2003, Windows
    Server 2008, or Windows XP
    http://support.Microsoft.com/kb/890830

    What you do not know the Windows Malicious Software Removal Tool
    http://blogs.Computerworld.com/what_you_dont_know_about_the_windows_malicious_software_removal_tool

    What is Windows Malicious Software Removal Tool (mrt.exe) and how to use it
    http://www.vista4beginners.com/Windows-malicious-software-removal-tool?page=1

    I hope this helps.

    Rob Brown - MS MVP - Windows Desktop Experience: Bike - Mark Twain said it right.

  • The file names changed in wingdings, including the file extension and I can't delete, change them, open, etc. Here are the pictures.

    Have (had) a file with multiple files it contains with pictures in each file.  A week ago the pictures were there.  Now, the names are replaced by wingdings as names and file extensions.  When I try to open it, it is not accessible and that the file name, directory name or volume label syntax is incorrect.  When I try to delete it, it says that the file name you specified is invalid or too long and specify a different name.  When I try to rename it, it tells me that if I change the file name extension, the file may become unusable.  If I try to change anyway, it says I've specified file name is not valid or too long.  Only tried for the name 1.  I did a restore in the case where a program interfered with that.  However, nothing has changed.  All of the suggestions.

    You can download and try to delete the file Unlocker http://www.softpedia.com/get/System/System-Miscellaneous/Unlocker.shtmlwilh.  Although it is not designed for this particular circumstance, it may very well work in all cases, as it has been very successful in a wide variety of situations are not specifically highlighted in the directions (where do not work the normal Vista options).  NOTE: Some antivirus flag programs this program as a malware, but it is a 'false positive' and is safe to use perferctly.  My own software to flag, but several other well-known software products it clean and the warning is included in the documentation of the program.

    I wish there was a way to save the images, but at this point, it seems that the only option is to delete because you can't rename files EHF (if this option is available-I hope that work above).  Unfortunately, System Restore does not affect the files of data, so even if a program caused this, System Restore can eliminate the cause, but it would not restore the files to their previous names.

    If you have Vista Business, Vista Ultimate or Vista Enterprise, you can be lucky because they retain the files called snapshots http://windows.microsoft.com/en-AU/windows-vista/Previous-versions-of-files-frequently-asked-questions.  It can be used to recover previous versions of files that have been changed or deleted accidentally.  Here's how: http://www.microsoft.com/windows/windows-vista/features/shadow-copy.aspx.

    If you have Vista Basic or Premium of Vista, you don't have a shadow, but there is a free program for you that does essentially the same thing called Shadow Explorer: http://www.shadowexplorer.com/.  I suggest that you download and implement as soon as POSSIBLE to protect you if you accidentally delete or modify a file.  It will not help you in this instance, but it can help save the next time.

    I'm more concerned about why this has happened in the first place and prevent it from happening again.  I saw file names change before, but never of wingdings which then do not let you open, edit, delete, or rename.  We will check some of your system files: go to start / all programs / accessories / command prompt and right click on command prompt, and then click Run as administrator.

    Type sfc/scannow, go and let it run.  It will scan and try to correct some of your system files.  If all goes well he comes complete with no corruption, it could not repair (if it has these post of corruption here or try to analyze it to find the problem or files using http://support.microsoft.com/kb/928228.  If you find any these corrupted files, try to post them here.  Maybe we can replace the good files on the disc.

    While in the command prompt, type chkdsk /f /r and enter and let it run.  It will scan and try to solve any corruption or bad sectors on your hard drive and remove especially as a cause.

    If this does not work, then please post repetitive errors in Event Viewer about the name change (Start / Control Panel / administrative tools / Event Viewer).  Here's how to use Event Viewer: http://www.bleepingcomputer.com/forums/topic40108.html.

    If this does not work, you will need to do a repair/system upgrade using the Windows Vista Installation disc authentic (you own or that you can borrow from someone).  Here is the procedure: http://www.vistax64.com/tutorials/88236-repair-install-vista.html as well as the upgrade from an earlier version of the Windows section of the following: http://support.microsoft.com/kb/918884.  Although this will not affect your data, settings or programs, you should always back up your data before you start just be on the safe side. If other procedures do not work, it is almost certain to work - but it will probably not fix your renamed files.  You can have a lot of updates to re - install (including all you need to remove service packs).  If the version on system with SP1 or SP2 preinstalled cane and the disc is an earlier version, then you will need to do a slipstream drive as follows: http://www.vistax64.com/tutorials/151606-vista-sp1-slipstream-installation-dvd.html.

    I hope one of these procedures can solve your problem.  If this isn't the case, after return and we will try something else.  Return message anyway so we know how it turns out.

    Good luck!

    Lorien - a - MCSE/MCSA/network + / A +.

  • A7r / A7 file name change and bottom of shutter

    A7r / A7 file name change and bottom of shutter

    A simple feature to add to a new FW must have the ability to change the START of the file name.

    If you have two new A7r... both have simular filenames and will start conflicts.

    What you should be able to do... it's name... say A7r_00001 HDR and HDR-A7r2_00001

    WHERE in the EXIF is the actual NUMBER of trigger to shutter (unchanging)?

    It's like the odometer of camera

    Excellent Suggestion!

  • Need to find the version number referring to the last name change for each emplid.

    emplIDName ageVersion
    --------   -----------
    1ABC252
    1ABC265
    1def279
    1def2815
    1def2918
    2JKL155
    2MNO168
    2MNO1711
    2PQR1820

    Need to find the version number referring to the last name change for each emplid.

    As indicated by the version number change when there is change in age as well, but I need a query that gives the version number referring to the last name change for each emplid.

    with

    DATA_TABLE (EmplId, Name, Age, version) as

    (select 1, 'abc', 25, 2 double Union all

    Select 1, 'abc', 26, 5 Union double all the

    Select 1, 'def', 27, 9 double Union all

    Select 1, 'def', 28, 15 double Union all

    Select 1, 'def', 29, 18 double Union all

    Select 2, 'jkl', 15 5 Union double all the

    Select 2, 'mno', 16, 8 double Union all

    Select 2, 'mno', 17, 11 double Union all

    Select 2, 'pqr', 18, 20 double

    )

    Select emplid,

    Max (Name) name of Dungeon (dense_rank last order by version).

    Max (Age) age of Dungeon (dense_rank last order by version).

    version Max (version)

    from (select emplid, name, version,)

    -case where name! = lag(name,1,name) on (emplid version order partition)

    then "renamed".

    end change

    of data_table

    )

    where the change is not null

    Emplid group

    EMPLID NAME AGE VERSION
    1 def 27 9
    2 PQR 18 20

    Concerning

    Etbin

  • Workspace name change

    Hello world

    I would like to change the name of a workspace, but I don't know how this change will impact on the tools that are already in this workspace.

    Is this ok to change the name, if I have a bunch of tools in the workspace?

    The tools will work after the name change?

    I'm under apex 4.1 on an 11g database.

    Thank you.
    Alex.

    Hello

    I would like to change the name of a workspace, but I don't know how this change will impact on the tools that are already in this workspace.

    Is this ok to change the name, if I have a bunch of tools in the workspace?
    >
    By tools, you are referring to the Apex Applications or something else?
    >
    The tools will work after the name change?

    I'm under apex 4.1 on an 11g database. >

    APEX uses internally the Worskspace ID, not name. If the only code that is affected is your code that uses the workspace name!

    See you soon,.

  • Is there a VM event for the VM host name change?

    Hello

    I have an application that is in talks with the VC to get the events from the virtual computer.

    I have a virtual machine on which I install VMWare tools to get the host name of the virtual machine. From now, the first time that the virtual machine gets up, my request to get the host name for this virtual machine. Now, if the host name of this virtual machine changes, is there any event that will be generated by VMWare or VC tools that my application can subscribe to in order to choose the host name change?

    Thank you

    There is no integrated case that will capture this.  The virtual machine has the dns name property that can be extracted from the db, or using one of the vi toolkits.  You can run gets against these data and validate it against the previous value, but no direct case is only triggered when the host inside the virtual machine name is changed.

    -KjB

    VMware vExpert

  • Full name change event is not get fired

    Our users IOM are automatically provisioned to OID using OID box connector. Provisioning works as expected. Now I'm going to put in place the event "Attribute of change", so that any changes made to the IOM users get implemented in OID. All change events work correctly until now except 'change name '.

    The "Lookup.USR_PROCESS_TRIGGERS" were after the entry for the display name.
    Code key-> USR_DISPLAY_NAME
    Decode-> change of name

    My "User OID" process has a task "name complete change" configured with adapter adpOIDMODIFYUSER. The AttrName mapped to 'Full name' and AttrVale is mapped to the full name of UserDefinition.

    I changed the value of 'Full name' from one user to the IOM, it does NOT raise the expected «Full name of Chane» event Any idea what could have gone wrong?

    Thank you!
    -Kabi

    Change the name of the task of 'Name change' to something else say "FullName updated"

    Create a new task "Name change" and on the integration tab, add the Copyfield adapter.
    You get the full name of the definition of the user and map to the same variable in the treatment of the data

    M

  • Cannot change the links applied to the text after the update of the MUSE

    This same event happened to me after you apply the update to MUSE before the update today, 08/01/2013.  All the links that are applied to the text on my web pages still exist, however, I cannot change.  The same situation applies to the associated ToolTip.  Please note that the links exist yet - I am simply unable to change after you apply the update today.  If I preview the page in a browser or that you publish the page, all the links work.  The only way I can apply a change is to remove each link and recreate.

    In addition, please note that links that I created in the vertical menu widgets appear very well!  I can view and edit them.  It seems that this problem only affects links applied to the text.  The images are included for reference.  Please do not hesitate to contact me if you have any questions.

    LinkProblem1.jpg

    LinkProblem2.jpg

    Hello

    What version of Muse you were updated to? We made a few changes important UI hyperlinks for version 3, which came out a month ago, so the passage of the 2.x to 3.x would cause some of these issues. I'm trying just to rule out the possibility that the upgrade to 3.0 or 3.1 and 3.2 caused this, because just dot release had a bug fixes.

    Thank you

    Sam

  • Email and name changed

    I got an email and a name in the profile, I opened first to use Kuler. I then wanted to change the name of my wife so that she could have the credit for the color schemes she did. I advanced and passed the email while I was there. Now, connect us with the new e-mail and none of the color schemes she does are listed under his name. Seek us the previous name and find the colors still exist, but we cannot open the original user.

    I thought that the name change would simply change the name and email does not delete the original user. These colors can be moved into the new user?

    We have discussed this issue with 2 accounts and it is related to authentication. Your original email account is no longer a connection accepted on Adobe.com. Either set up a new account with the original e-mail or log into the new account and him switch back the email to your original e-mail in the account of your editing area. You should get access again with your old email. Let me know if this does not work.
    Saami

Maybe you are looking for

  • very confused with msn email

    I have address msn.com for more than 15 years. now is live.com, windows live and all the rest. what I have to change e-mail address or are all the same. I don't know how I got to this site, I'm gent, disabled, and lost with all this stuff. Phone numb

  • TDC001

    Hello, I try to apt control servo controller a ThorLab TDC001 using LabView but without using the ActiveX. Technical support of ThorLab sent the host protocol commands but for some reason I can't connect with the servo. Can someone tell me how to sen

  • Reboot in Normal mode, safe mode

    start the computer in safe mode. .i have to get out of this... I think that I have to restart the computer and don't know how proceed... also mcfee don't turn on in safe mode prevents this... Help, please... Thank you

  • Switchable graphics: is it possible to use the GPU Radeon ONLY?

    Hi all I have two laptops: one is a Latitude E6420 and the other an Inspiron 14 Intel N4050. Both have switchable graphics; NVIDIA Optimus on the E6420 and Radeon on the N4050. I'm on Windows 7 Professional 64 - bit genuine on both machines. With the

  • ESXI 6.0 + Cisco c240 M4 = purple diagnostic screen.

    Hi all!I try to install ESXi 6.0 (custom iso fo Cisco: Vmware-ESXi-6.0.0-2494585-Custom-Cisco-6.0.0.1) onCisco c240 M4 server, but it's over purple diagnostic screen. The screene shots are attached.I also tried to install the iso not personalized (VM