Replace the selection in the name of the group file name

Hi guys,.

I have a very good script that saved images much faster, but my colleagues are some problems ruefully at the end.

var saveFile = file (oldPath + "/" + theNewName + "-" + doc.layerSets [a] .name + '.jpg');

I use a tool to rename mass, but they find it too complicated, so I was wondering if it would be possible to change it to the following.

The name of my group is called 'MUG-IMAGE '. The name of the file is "12345", so with the above the existing script maps, it will record it as '12345-MUG-IMAGE '. Then I use a mass renaming tool and move the 12345 at the end of the file name, so it reads as "MUG-IMAGE-12345".

I have several groups who use this script in the same file, so the "12345" is always at the front, but ultimately must be rearranged to adapt to different points in the file names. So there may be 'CLOTHING-12345-WHITE' or 'CASE-BLACK-12345-SMALL.

I want to know is if there is a way to insert an asterisk (or something similar) where I want the name of the file that you want to go? Thus, the name of my group would be "MUG - IMAGE-* ' and choose the file and run the script to register the group in JPEG format, it takes the file name and replace the asterixes with the name of the file, so it would be"MUG-IMAGE-12345"- and to do it for the different groups with Asterix different investments?

I hope I made sense. I would really appreciate help on this issue.

Thanks in advance!

var fileName = theNewName.slice (0.5);

If (indexOf("***")! = - 1) {}

var saveFile = file (oldPath + "/" + "-" + doc.layerSets [a].name.replace ("*", fileName) + ".jpg");

}

else {}

(var File(oldPath+"/"+"-"+doc.layerSets[a].name+"_"+fileName = saveFile) + ".jpg");

};

Does this work for you?

Tags: Photoshop

Similar Questions

  • Automatically replace the jpg files with the same file name TIFF.

    Is there a a way to automatically link the files by replacing the jpg files with the same exact file name TIFF?

    Thank you!

    Click on the link in the links Panel and open the Panel menu. Choose repeat the link extension.

  • How to replace the SWAP file. SYS that bulky and bulky?

    Hello

    My question is how to replace the SWAP file. SYS that is bulky and bulky?

    Is it possible to "BRING" different "restore points" as separate files and reduce in size for the management and portability?:

    The simple answer to your question is no!

    Please provide a copy of your system information file. Type the system information in the search box above the Start button and press the ENTER key (alternative is select Start, all programs, accessories, System Tools, system information). Select file, Export and give the file a name noting where it is located. Not to place the cursor in the body of the report before exporting the file. The system creates a new information file system each time system information is available. You must allow a minute or two before the file is completely filled before exporting a copy. Please download to your OneDrive (formerly Sky Drive), share with everyone and post a link here. Normal mode preferred report. Please say if the report was obtained in safe mode.

    For assistance OneDrive see paragraph 9.3:
    http://www.gerryscomputertips.co.UK/MicrosoftCommunity1.htm

  • copy / paste does not replace the existing file

    Hello

    Sometimes, I copy a jpeg file and passed in a folder.  This file has the same file name.  but after having stuck to it, I noticed that there are 2 files with the same name.
    How can I get to replace this file?
    Thank you

    Hello

    Sometimes, I copy a jpeg file and passed in a folder.  This file has the same file name.  but after having stuck to it, I noticed that there are 2 files with the same name.
    How can I get to replace this file?
    Thank you

    If you paste a file into a folder that already has a file with the SAME file name, you will be informed and asked to choose one of the following:
    1. do not copy
    2. copy and replace those already on file
    3. copy and keep both.

    Perhaps, you have chosen the 3rd weight?

    modification of...

    It will not replace the existing file, unless both have EXACTLY the same file name.

  • Replace the baggage files and maintain links

    Hello-

    I need to replace a file of baggage in my current RH7, with a new version of doc project. How to maintain links to the document so that I don't have to change the properties of binding in each project file? Or if not possible, how to identify which documents are currently related to this baggage file so I can edit hyperlinks? Thank you!

    Hello

    For my money, I think that a more secure approach would be to always use the same file name for the file of baggage. Just make the difference in the level of the source.

    For example, call the RedRabbit baggage file if you want, but on your hard drive (or anywhere where you store the file), you have RedRabbit Version One. Simply copy and rename so that you can easily replace the baggage file. In this way, you don't have to play muddy muck with Binder and search and replace and all that rot.

    See you soon... Rick

    Useful and practical links

    Wish to RoboHelp form/Bug report form

    Begin to learn RoboHelp HTML 7 or 8 days - $24.95!

    Adobe Certified RoboHelp HTML Training

    SorcerStone blog

    RoboHelp EBooks

  • Text editor ' Save as... '. "broken - replaces the original file as well

    ' Save as... '. "removed some sort items of menu standards a long time ago, but I used this http://osxdaily.com/2012/08/27/enable-save-as-os-x-mountain-lion/ to restore a just as long. This addition of shortcut recently stopped working properly. Creates the new file, it also replaces the original file. Good OOP...

    I removed the keyboard shortcut and discovered that if I open the file menu, hold the Option key to activate twice in save Sub... than that STILL not work correctly. It seems something within the modified OS and buggered how to save under... anything works.

    Does anyone know how to save under... work again? Please do not respond if your answer is to use two copies. This isn't an answer as duplicate is a replacement of several wrong step of the simple and easy as... backup function.

    OS X El Capitan: save documents

  • Ho I replace the dll files and run codes such as the double-click to open

    How to replace dll files and run codes such as the double-click to open

    Hello

    1. What are the dll files you are trying to replace?

    2. Why do you want to replace the dll files?

    A dynamic library (DLL) file is an executable file that allows programs to share code and other resources to perform specific tasks. Microsoft Windows provides DLL files that contain functions and resources that allow Windows programs to work in the environment with Windows.

  • I downloaded red CS6 plugin and added to the contents of the package, replaced the existing files with the new without saving, now my thumbnails images RED and the color correction do not WORK! How to bring back my old file importerRed! ?? Help!

    I downloaded red CS6 plugin and added to the contents of the package, replaced the existing files with the new without saving, now my thumbnails images RED and the color correction do not WORK! How to bring back my old file importerRed! ?? Help!

    Try asking in the forum Premiere Pro seems to be an Adobe first Pro Lab

  • Always replace the output file for serial port.

    Hello, I use Workstation 7 on Linux and use the option "Output to a file" serial port for the logging of messages to the client for debugging.

    It works perfectly, however, if the file exists already workstation asking what to do (crush, add, etc.). It works, but I would like to have the option to auto restart, restore, instant, etc. and this message gets in the way.

    Is he a .vmx parameter I can apply to my computer always replace the output file without asking?

    Yep - found

    you need these two lines:

    msg.autoAnswer = 'TRUE '.

    Msg. Serial.file.Open = 'Add '.

    _________________________

    VMX-settings- WS FAQ -[MOAcd | http://sanbarrow.com/moa241.html]- VMDK-manual

    You find me also in the PhD Virtual Backup support team

  • Write that VI PNG file will not replace the existing file

    Hi all

    I use VI file PNG write to store the graph in a png file. I am able to save the file with a specific file name, which includes the date, model number, serial number etc.. Once the chart is saved as a png file, if I make changes in the graph (as autoscale, turn captions etc.) and try again to save the file with the same file name, write PNG leader VI does not save the changes I made on the chart. I'm looking at the timestamp on the windows Explorer, but it is not updated. I opened the VI itself (which is write protected) to see if it generates an error if I provided the same file name, but it does not generate an error.

    I don't know if I am missing anything.

    Can you people please help me find a way to replace the existing PNG file?

    I'm using LabVIEW 2013 on Win 7 machine.

    p.s. I use the second method mentioned in this article:

    http://digital.NI.com/public.nsf/allkb/5AE4ADCBB65A6D8F86256FBF007A1AC1

    (Programmatically with the Get Image method).

    Thanks for your help

    OPR

    OPR wrote:
    ... Write VI PNG file does not save the changes I made on the chart. I'm looking at the timestamp on the windows Explorer, but it is not updated.

    You are also looking at the image itself? Explorer Windows cannot update the timestamp in the display immediately, or you might be looking at creation time, which doesn't seem to change when you replace a file.

    I can say that I saw a similar question very recently (he was also PNG, even if it's not really relevant), and here it certainly crushes - http://forums.ni.com/t5/LabVIEW/LAVA-snippet-overwrite-keeps-old-date-time-of-png-file/m-p/3257059#M...

  • It is possible to omit the popup warns "do you want to replace the existing file?

    Well, the title says already

    I have an application where the user can save the results to a log file; These data are added

    (using OpenFile (file_name, VAL_WRITE_ONLY, VAL_APPEND, VAL_ASCII), so the opening of this file will not replace its content, but it adds up.) It would be appropriate to use the same file.

    Unfortunately, when the caller (FileSelectPopupEx) and selecting an existing file of the warning that appears the file already exists. It's OK. But the message keeps saying "want to replace you? In this case, this message is quite confusing for the user, because the program will not replace anything (which of course does not function FileSelectPopupEx).

    So I was wondering if it is possible to avoid or change this message popup?

    Thank you!

    What constant you spent buttonLabel parameter? The behavior of the function changes depending on the indicated button. In particular, (citing the help):

    Note   If VAL_SELECT_BUTTON or VAL_LOAD_BUTTON is passed to the parameter buttonLabel, FileSelectPopupEx service confirms that the selected file exists. If the file does not exist, the function prompts the user to select an existing file.

    Using the button "Save" should result in the confirmation message that you face now.

    I guess if you are using the simple OK button no prompt (to confirm: I'm not sure but I can't test it at the moment).

  • Windows media player in the browser asking to replace the html file each time

    Hi Alll,

    I have a case in which I run a WMP in a browser using ActiveX container, the problem I am facing is on each race its asking me to replace the existing html code in the file in the folder, is there a way to get rid of it, I dnt want to click on replace every time. Y at - it an easy way to do it.

    Please let me know.

    Ankit

    Thanks, this was very helpful

    smercurio_fc wrote:

    The dialog box is caused by the characters to write VI file you are using. If the file already exists, you will be asked if you want to replace it. Instead of using these screws, simply use text file read and write functions of text files that are in the range of the file IO.

    Your code has another question: your use of the constant current path of VI. See why my executable does not work when you use the constant path of the current VI?

    smercurio_fc wrote:

    The dialog box is caused by the characters to write VI file you are using. If the file already exists, you will be asked if you want to replace it. Instead of using these screws, simply use text file read and write functions of text files that are in the range of the file IO.

    Your code has another question: your use of the constant current path of VI. See why my executable does not work when you use the constant path of the current VI?

  • OfficeJet Pro 8600 more: Saving scan to file, always asking to replace the existing file.

    When I scan a document using the software on my computer, it asks to save it.  When I say yes, it saves it in a new folder I did. But he still wants to replace the existing analysis.  I want that each new scan to be named Scan0001, Scan0002 etc.  I want to keep a copy of all the scans I'm emailing them, or simply keep a copy on my computer.

    I think I just found my own solution.  He has the ability to "see him save as dialog".  I think that it should be disabled.

  • I need to replace the 2 files of system32 of VISTA (desk.cpl and spwizui.dll) but I can't find a zone DL system files of VISTA anywhere on the Internet.

    Can someone tell me the VISTA system files to download? I need to replace the BUREAU. CPL and SPWIZUI. DLL. a lot of blocking issues. I struggle to go beyond office. sfc/scannow reveals that the two files (and also the same as those in store) are corrupt. I don't have my computer with me CD. Thank you

    I suggest that copy you them to a good working computer.

    How to use the System File Checker tool to fix the system files missing or corrupted on Windows Vista or Windows 7
    http://support.Microsoft.com/kb/929833b

  • Not enough Drive Space Error when only to replace the existing files in the copy

    Hi, I have same directories. It is on the D drive and the other is on the E drive. Both drives are 2 TB in size and rich. All files are 262 MB in size. I need to copy all the files from drive E on the D drive, since all files on drive E have video data and files on the D drive are not, although they are the same size files. When I try to copy and replace the files in drive E D, I get an error message indicating that I don't have enough disk space. It is sufficient as I am only to replace the files. No new additional file is copied. What can I do?

    If the files on the 'E' have video and those of 'd' only that they may not have the same size.

    Second, you must be almost 2 x the space to copy files as they are the copy in a folder "tmp".

    If the files are the same on D and E, why don't delete you those without video and move those with?

Maybe you are looking for

  • Why my layout is all wrong until I connect to my site?

    I just upgraded from v3 to v4 of Firefox. Myself and other members now us problems with the layout of the site. If you use Firefox 4 and visit http://www.vwaudiforum.co.uk/forum/forum.php , you should see the layout all wrong... If you look in other

  • HP pavilion i5-n040us: black screen.

    Thank you PK of Provost David. Your solution to my problem of closure has worked. But there is another problem that persists. When the screen turns off screen always appears in black. Pressing the mouse button or pressing any button turns on normally

  • How to print on wove paper

    Computer is iMac 9.1. Printer is a HP Officejet Pro 8500 first model A909n Operating system is? I try to print a Microsoft Word document Mac on vellum. I get an error message "paper size or type is incorrect." I use vellum 8 1/2 "x 11". When I click

  • can not find the driver for my lexmark 7300 Printer series it that someone knows a site

    I have no disk for my old printer windows said there isn't driver for lexmark 7300 series y at - it another way to activate my printer

  • Part number Seagate by HD X143K

    Buongiorno, VI chiedo che HD X143K del CTKF8 Dell PowerEdge R710 server even confirmed (serial number: J94W65J) sia dal identified part number seagate ST9146803SS Grazie, Gianluca