check my file naming

Hi all

I have several InDesign files that I need to check the compatible file naming. Can someone help me to predict this JS code.

Here is an example:

XX_001_019 say-A story.indd (it is an example of incompatible file naming)

XX_001 - 059_telling_a_story.indd (this is the good file naming)

In short of naming for file:

First 2 letters are uppercase; then underscore (_); then the 3 digits; then underscore (_); then the 3 digits; so any word in lower case separated by the underscore character (_);

I need JS code that can list to the bottom of the list of incorrect file naming.

Thank you very much in advance.

PIMS.

PIMs salvation,

I have not tested, but it should work

Here is the code:

var myInddDoc = app.activeDocument,
    myInddDocName = myInddDoc.name,
    testPattern = /[A-Z]{2}\_[0-9]{3}\-[0-9]{3}\_[a-z\_]{1,}\.indd/;

if(testPattern.test(myInddDocName))
    alert ("File Naming is OK");
else
    alert ("File Naming is WRONG");

Hope that helps.

--

Marijan (tomaxxi)

http://tomaxxi.com

Tags: InDesign

Similar Questions

  • My PC is running processes that are labeled as firefox, but I uninstalled and will find no more files named firefox, but pc cleaners say it is running

    I tried to clean my laptop and keep noticing the process named firefox and tracks slowed down... that surprises me, because I don't have firefox on this laptop, I maybe once, but no more, I checked the list of uninstaller in the Control Panel, is not here, I searched on the c: drive of files named mozilla or firefox and deleted I can't find more and yet it is always in my process list and also seems to be a memory hog. I use toolwiz as my PC cleaner, he sees things in firefox and tons of data from when do privacy cleaning, yet it gives me the message "cant fix firefox works"... whenever I came across a file, I think that can be connected, it is to me that firefox is running shit and it won't let me delete some things that I think can be the question...

    On the process tab of the task to the top manager in the menu bar, click View > select columns and add "Image path name. This will show where the firefox.exe process is launched on the hard drive, and I hope that will point to a specific program. If the location is suspicious (for example, the Temp folder) I would suspect malware. Note: you may need to use the button at the bottom of the tab "show processes from all users".

    Our technical support article lists cleaning tools other users have found useful: Troubleshooting Firefox problems caused by malware. The tools are free and take a long time to run a full scan. If they seem to finish quickly and demand payment to clean, you can have a serious infection. To continue the investigation, try the specialty forums listed in the article.

  • How to install a file named "firefox_plugin_2.1.1.0720.fzip"?

    Hello
    I am installing an extension for firefox Foxit software (PDF reader) but firefox always comes back and says that it is impossible to start the anti-virus program
    So when I get after the file: how to install a file named 'firefox_plugin_2.1.1.0720.fzip' will not unzip or load in firefox. How can I get the program/extension to load?
    Thank you
    Jsteff
    [email protected]

    This installer fzip is managed by Foxit Reader. The instructions are near the top of the
    download page for the plugin. Or you can use "Check for Updates" in the Help menu of Foxit. Your details indicate that you already have a version of the Foxit plugin.

  • AprΦs the dΘmarrage, the text file named Guadeloupe is open. Any ideas on what this is?

    AprΦs the dΘmarrage of battery empty, a text file named Guadeloupe (which I didn't create) with a single (visible) line of the text with some strange characters is open along with other programs that start at startup. Now, I tried to locate the source of this file without success - it's as if the file does not exist. I did not always have this problem (or event) arrive, and I didn't know of any other cases when searching online.

    Any help or information will be greatly appreciated.

    I'm on an Early 2011 Macbook Pro 13 inches, 2.3 GHz, 8 GB ram i5 upgraded, under OS X 10.10.5.

    One of your connection objects may be causing the problem. Please select the login items tab in the users pane and groups of system preferences. Remove all items that you do not recognize. If you don't know which ones to delete, double-click on each to test.

    If a connection item is dimmed and cannot be deleted, click on the padlock icon in the lower left corner of the window and enter your login password when you are prompted. Then try again.

    To avoid confusion, please note that checking or unchecking the box next to a point of idle connection not she. You must remove the item from the list.

  • 7 d MkII file naming

    I'm naming my 7 d MkII files to 7D2_. But when I check the file name displays D2_.

    I use Setting1 user and on the display screen 7D2_ file name.

    Can someone please tell me what I'm doing wrong?

    Thank you

    Paul

    IF the underscore character is at the front of the name of the file, your unit is set to Adobe RGB and not normal RGB. Unless specifically, you need & edit Adobe RGB jpg I recommend to put into service. My 7 2 D file numbers are 7 d 2-1234 etc.

    Make sure that your color & reset & I bet that you can then use 7 2 as the prefex.

  • My laptop recognizes the drive but does show that two files named "My Data Sources" and "Bootsect.

    original title: old Hard Drive Access

    I have recently had problems with my pc, I decided that I will buy a new Tower, but I really need to get some files off the old hard drive, I bought and pregnant for the SATA drive out of my old pc. I'm now trying to get the files on my old drive through my laptop. The laptop is running Vista. My laptop recognizes the drive but does show that two files named "My Data Sources" and "Bootsect. When looking at the properties it shows that the majority of the disc is full, only 30 gigs for free the 160 GB drive. I don't understand why I can't access to find one of my old files. Help, please!

    Hello

    ·          These files are encrypted?

    Step 1: Step 1: temporarily disable the security software and check if it makes a difference.

    http://Windows.Microsoft.com/en-us/Windows-vist/disable-antivirus-software

    Note: Make sure to allow him to return so that your computer is protected.

    Step 2: Run a check disk.

    http://Windows.Microsoft.com/en-us/Windows-Vista/check-your-hard-disk-for-errors

  • names of data files Naming Convention!

    Hello

    My question is maybe stupid, but I'm not sure of the my control/log/dbf file naming convention. I am oracle 11g and asm is configured with active OMF. When I checked the file name, I get filename with certain numbers. What this number means.
    ASMCMD> ls
    EXAMPLE.265.790927371
    ONKAR.267.791219239
    SYSAUX.257.790927221
    SYSTEM.256.790927219
    UNDOTBS1.258.790927221
    USERS.259.790927223
    ASMCMD> 
    Could someone tell me please what these numbers represent? I tried google, but not got reasonable answers.

    -Onkar

    http://docs.Oracle.com/CD/E11882_01/server.112/e18951/asmfiles.htm#i1023283

    First number is the number of folder (not in the database, but in ASM), and as I noticed, the files of 'user' (from ASM instance view) begin 256. 'Progressive', as ASM fichier_parametres and OCR files are less than 256.
    Second number is incarnation, which is derived from the date and time when the file is created.

    These two ensure uniqueness of the names of files in ASM.

  • urgent! How to change the program simultaneous .out file naming rule

    I want to change the output to sysadmin. < request_id > name.
    where and how to make this change?
    Thanks in advance!

    Hi Tao;

    I want to change the output name in sysadmin. .

    Check it Please Note: how to change the output File Naming Convention [1034453.6 ID], I belive that you will find some answer in

    Respect of
    HELIOS

  • HP Health Check .jse Files as Infections - false Pos?

    http://i.imgur.com/kCgqD5B.jpg (copy - paste from the address bar)

    2 HP Health Check ( .jse ) files in the Imgur link above are displayed as Trojan Infections by AVG AV on Vista desktop a friend.

    Download the 2 files to AVG via their form turns out to be more difficult than to ask if these files types have been labeled as

    False positives in the past.

    Any comment is appreciated.

    Upload it to VirusTotal, they it will scan all available virus scanners

    https://www.VirusTotal.com/

    more than likely it is a false positive.

  • NetBook XP, start-up stalls, must close and load the last well-known configni, no virus on check, no file of 0 k on check

    NetBook XP, start-up stalls, must close and load the last well-known configni, no virus on check, no file of 0 k on check.  Help!

    Hi Matthew,

    This is mcafee.  I uninstalled and reinstalled and now it works perfectly.  Thanks a lot for your help.  HPK
  • Check the file system on C or registry cannont load the hive!

    Ok... I have a Dell Vostro 1510... all of a sudden, I can't on this laptop!  I have Windows XP Professional.  It lights up when I choose to start windows... I am said to be:

    Checking file system on c:

    The type of the file system is NTFS.

    Volume label is System.

    Then, when it starts to run it says: CHKDSK checks the files (step 1 of 3)... it happens to 47% finished and that's all!  It won't do anything else, it just stops!

    If I have to cancel the verification file system I get this message:

    STOP: c0000218 {Registry file failure}

    The registry cannot load the hive (file):

    \SystemRoot\System32\Config\System

    or its log or alternation.

    It is damaged, missing, or not accessible in writing.

    I do not have the disks provided with the laptop or I will say that I can not find them... I read a lot of these forums but none I saw helps me!  Because I can not enter and try to run anything!

    Thanks for any help in advance!

    I see you mentioned do not have all the disks with the laptop and maybe it's that he came not with any, because the installation files are likely in a hidden partition.
    but try to borrow a winxp cd and boot with it.
    then in the window settings pitch repair to start the recovery console.
    then at the prompt of disk, run the following >:
     
    Chkdsk /r
    Chkdsk /f
     
    then exit, remove the cd and restart the computer.
     
    the above commands are redundant, but nothing wrong with double controls.
     
    In addition, if you receive a following error on boot sector, then run via the recovery console fixmbr.
     
     

    --
    DB·´¯'·.. ¸ ><)))º> --> sent via windows live mail

    .

    DB·´¯'·.. ¸ >-))) º > ·´¯'·.. ¸ >-))) º > share nirvana mann
  • What is the file named citrix?

    I noticed a file on my files program called citrix. It was created in2012. My computer is a windows vista basic family bought in 2008. I check the file and it was empty. could someone explain what this file is used for and why it is empty. I know I have it load not down on my computer. should I keep the file or delete it.

    Citrix is the name of a company that makes software (such as Microsoft Windows and Office and other software).

    Citrix may have been installed on your computer when you used one of their products, such as GoToMeeting to participate in a conference meeting in line or Citrix Receiver for you to connect to your school to remote or network.

    In all cases, it is harmless.  You can remove it or keep.  If you choose to remove it, I recommend going in the Control Panel, choose "Uninstall a program" and detached in this way to ensure that the uninstall is completed successfully.  Simply delete the file/folder can leave other traces.

  • A .dll file named qtintf.dll is missing from my Win 7 system

    Hello

    A .dll file named qtintf.dll is not found in my Win 7 system. I have this file, but how to add it to my system please?

    Dear Aria,

    Ok! Please follow the steps below:

    1 - open a prompt, right click and "Run as Administrator" on the cmd.exe

    2 - type: regsvr32 C:\Users\Desktop\sample.dll and press to enter.

    3. you got a message like: DLLRegisterServer in sample.dll succeeded. If something goes wrong, please do not hesitate to post it here.

    Best regards

  • Please give me the number of hash MD5 to check the file .iso from win7

    Please give me the number of hash MD5 to check the file in win7 because when I try to install win7 (after dload web) its saying some files are missing if please check the files and restart the installation process. so I need to check the file I downloaded is full or not

    Please send me the file md5 hash as soon as possible

    Windows 7 RC Build 7100 x 86
    File name: 7100.0.090421 - 1700_x86fre_client_en-us_Retail_Ultimate - GRC1CULFRER_EN_DVD.iso
    Size: 2.35 GB
    MD5 Hash: 8867C13330F56A93944BCD46DCD73590

    Windows 7 RC Build 7100 x 64
    File name: 7100.0.090421 - 1700_x64fre_client_en-us_Retail_Ultimate - GRC1CULFRER_EN_DVD.iso
    Size: 3.04 GB
    MD5 Hash: 98341AF35655137966E382C4FEAA282D

  • After that the effects cannot continue: error when access to the files instead of inside "/ users/me/Library/Preferences/Adobe/After Effects / 13.8", if it please check the file permissions and try again.

    After that the effects cannot continue: error when access to the files instead of inside "/ users/me/Library/Preferences/Adobe/After Effects / 13.8", if it please check the file permissions and try again.

    [Fixed spelling - Mod]

    Go to the folder listed in the path and change the permissions to read/write. Do you know how? It is in the info file.

Maybe you are looking for