Batch file regular expression




















Office Office Exchange Server. Not an IT pro? Resources for IT Professionals. Sign in. United States English. Ask a question. Quick access. Search related threads. Remove From My Forums. Answered by:. Archived Forums.

Improve this answer. Izzy Izzy 8, 2 2 gold badges 29 29 silver badges 35 35 bronze badges. Sign up or log in Sign up using Google. Sign up using Facebook. Sign up using Email and Password. Post as a guest Name. Email Required, but never shown. The Overflow Blog. Podcast Making Agile work for data science. I need this option to replace e. Hmm, I am not a programmer. Hi Peter! I hope to have some time soon to add that option and others. Hi Nic, I need your help again if you can.

It saves me so much time and effort in file management. Hi Nic! Nic, This tool is quite useful!! Kind regards. How Monitors Work The monitors work by continually scanning the specified folder directory and subfolders for specified files that match a predefined naming pattern mask as well as other properties.

Monitors List After a monitor has been set up, it will appear in the list of monitors. You can also save and open monitor lists easily, so you can reuse your monitor setups later. Processing in Automatic Mode In automatic mode processing works in 2 stages. Batch RegEx can perform processing jobs in 3 different modes: Command Line Mode - only the console window will be displayed.

Invisible Mode - no user interface of any kind is shown, and the processing job is performed in the background. Creating Processing Jobs Creating a processing jobs is straight forward. Managing Processing Jobs Once the processing job has been created, it appears in the list of processing jobs. Hierarchical Action Sequence with Conditional Processing.

Action Sequence With Action Sequence you can easily specify which actions to perform on the selected files, under what circumstances, and in which order. Conditions and Processing Paths Conditional processing is possible with conditions, which are simply special actions that make sure that the actions that follow them should only be performed if particular requirements are satisfied: file name and file size match specified parameters, or a file contains certain text, etc. XML Templates The action sequence that you design, including all the actions, conditions, levels of hierarchy, and individual action's settings can be easily saved to a file as XML-based template that you can reuse later.

File Information Condition Check if the file being processed matches specified file properties such as name pattern, location, size, and attributes. The following checks can be performed by this condition: File name and extension match a predefined pattern either wildcards or RegEx File's parent directory matches a predefined pattern either wildcards or RegEx File's full path matches a predefined pattern RegEx only File's size is within specified range: at least N bytes, at most N bytes, exactly N bytes, between N and M bytes, not equal to N bytes File's creation, change, and access dates are within specified range File's attributes match supplied values.

Content Size Condition Check if the size of the file's contents match the specified value or range. RegEx Content Condition Check if the file contains or does not contain specified text pattern using Regular Expressions.

Restrict search range to either specified character or line range, like "search only within last 50 lines". List of RegEx search patterns can be saved for future use to a text file RegEx search patterns can be imported from a text file or pasted from clipboard.

Condition Behavior Settings Every condition has these common behavior settings that determine how it interacts with other conditions and thus how it affects file processing flow. Condition group behavior determines whether the conditions add to each other i. In addition it is possible to compare conditions inside a group using logical XOR operator, and negate the entire condition check. Negation of a condition or a condition group result may be very useful, because some times it is easier to define the checks for the True case and not for the negated case.

Full RegEx Support. Complete syntax highlighting for all RegEx patterns Optional dynamic syntax tips for RegEx elements RegEx support in auxiliary operations: file searching, file renaming, etc. Various RegEx options: ignore case, multiline, single line, etc.

RegEx Syntax Highlighting Program features native support for Regular Expression syntax highlighting and contextual tips. RegEx Text Selector Tool Regular Expressions Text Selector will generate a valid RegEx pattern that will match an arbitrary block of text, given by the starting line together with total line count, as well as starting character together with total character count per line.

RegEx Lines Selector Tool Regular Expressions Lines Selector will generate a valid RegEx pattern that will match specified lines of text given certain constraints such as: line range and line contents.

Any combination of the starting tag, ending tag, and the content can be selected. It basically lets you treat otherwise textual content in a numeric context.

With it you can also perform RegEx search and replace operations that support RegEx substitutions that allow you to swap to pieces of text for example. It can also highlight matches in the original text, so you can better understand the behavior of your RegEx patterns. RegEx-Based File Search - you can use Regular Expressions when searching for files whose names should match a specific pattern.

RegEx-Based File Rename - you can perform RegEx-based search and replace operations on file names , giving you advanced control over file naming. Saving Processed Files and Output Options.

Output Folder Options You have total control over where the processed files should be saved. Output folder directory can be: Original folder - processed file will be saved to the same folder where original file was read Existing folder - existing folder specified using absolute path Folder specified with Relative path - you can use relative paths to specify output directory: i.

If a destination folder does not exist, it will be automatically created during processing. Running Third-Party Programs as Post-Processing Step You can specify to run a third-party program after processing each file, or after processing all files, providing output file path s as the argument.

Other Options You can specify additional things that include: backup policy, whether original files should be deleted, should processing stop on errors, etc. Normal Output Mode In Normal regular output mode, processed files are not joined, split, or zipped, and remain singular.

Other Output Options When processing files you have additional output options. There is also an option to run third-party tool on processed files automatically. Processed Files Naming Options. Rename Files You can give processed files any name you desire with the powerful built-in file name designer tool. Use Tags to Generate Dynamic File Names There are close to different tokens that can be used to generate dynamic file names that meet your requirements.

Recursive File Search One of the ways you can add files to the file list for processing is by doing a search for all files that match criteria you specify. Recursive scanning with customizable depth Specify files to include and exclude using highly customizable patterns and masks - much more powerful than your basic wildcards but easier to use than Regular Expressions!

Specify directories to exclude from search Use Regular Expressions to specify file name patterns Use case sensitive matching Note that you can save your customized file searches as templates for future use.

Search for Files Based on Properties You can find files you need for processing based on file properties like size or creation date, and attributes. Search in Files for Text Content You can search for and add files for processing using not just their names and properties, but actual contents as well.

Advanced Wildcards. There are numerous triggers available: daily, weekly, monthly, event-based, etc. Setup a Processing Job - General Properties Processing jobs allow you to setup various batch file processing tasks that will be executed on a specified trigger or on schedule. Setup a Processing Job - Select Files There are several ways in which you can specify which files should be processed by a processing job: Specified directories will be scanned for files matching a given name pattern Specified file search template will be used see Recursive File Search Specified list of files containing files' full paths will be used.

Setup a Processing Job - Specify Actions Once you have specified which files should be processed by a processing job, the next step is to specify how these files should be processed, which actions and operations should be performed. Setup a Processing Job - Output Settings Output settings determine where and how the processed files are saved.

Setup a Processing Job - Triggers - Monthly Last step in setting up a processing job is to define a trigger or specify a schedule that will determine when the processing job will actually execute. Setup a Processing Job - Triggers - Weekly Last step in setting up a processing job is to define a trigger or specify a schedule that will determine when the processing job will actually execute.

Setup a Processing Job - Triggers - Daily Last step in setting up a processing job is to define a trigger or specify a schedule that will determine when the processing job will actually execute.

Setup a Processing Job - Triggers - Event Last step in setting up a processing job is to define a trigger or specify a schedule that will determine when the processing job will actually execute.

Common Tasks. Common Tasks - Working with Lines One of the most frequent tasks when processing text-based files is working with lines in one way or another. Common Tasks - Copy Content There are several built-in common tasks for copying or moving parts of the file to another position. Convert files containing binary data in hex form to actual binary representation and vice versa Convert to and from Base and Quoted-Printable encodings Convert HTML to plain text Convert Morse code to plain text and vice versa.

Common Tasks - Working with Files Not only can you modify file's contents with common tasks, but it's very easy to perform various file system -related operations as well: Find files using content-based recursive search Move and copy files Rename files Delete files Split and join files Encrypt and decrypt files Generate file hashes Modify file attributes.

Common Tasks - Binary Data There are various common tasks related to working with binary data and modifying individual bytes as well as performing binary search and replace operations.

Some benefits of command-line processing include: Ability to launch program and perform file processing on demand or by invoking it from third-party tools Perform processing a bit more efficiently without consuming a few extra resources needed to display and update Graphical User Interface Manually schedule the program to run with specific parameters using third-party scheduling programs or other automation software Execute batch processing tasks directly from Windows Power Shell Execution from a batch file with different parameters each time Simultaneous execution of several instances Faster startup and configuration as predefined command line snippets can be used, and in general typing is faster than manipulating UI elements.

Highly Customizable with Options. Integrated Help with Informative Tooltips. Very Detailed Tooltips Batch RegEx features very detailed and helpful tooltips that are available for virtually all user interface elements.

Movable Tooltips Some tooltips can be moved around and pinned so they stay visible on top of other windows until closed. File Tooltips There are very detailed tooltips for files in the file list! Action Tooltips Action tooltips display detailed information about the actions in the action sequence.

List Items Tooltips Various lists in the program that let you select different items like tokens, tags, etc.

Concept-Related Tooltips Certain tooltips not only explain what a particular button or interface element does and how it can be used, but they also explain the underlying concept, as is illustrated by this tooltip displaying information about Regular Expressions language element. Smart Contextual Tooltips Although optional and can be turned off, the program also offers contextual tooltips that will appear when you move your mouse over distinct parts of text in certain text fields that support syntax highlighting.

Optional Integration with Windows Explorer. Process Files from Windows Explorer If you install optional Windows integration component, you will be able to launch Batch RegEx directly from Windows explorer by selecting the files or a folder containing files that you wish to process, right-clicking on the selection, and choosing Batch Process Files menu.

Program Starts in Compact Mode When you launch program from Windows Explorer, it starts in a very compact mode with the files you selected in Windows Explorer already automatically added and ready for processing. Compact Mode UI When the program is started in compact mode, it shows only the primary action you selected in the Windows Explorer's right-click context menu when you launched the program, and additionally crucial output settings that include file naming pattern and destination to save processed files.

Advanced Logging. File Operations Helpers. File Copy Helper This dialog helps you copy files matching criteria you specify. File Move Helper This dialog helps you move files matching criteria you specify from one folder to another. File Rename Helper This dialog helps you rename multiple files matching criteria you specify according to the specified pattern.

Split Files Helper This dialog helps you split multiple files matching criteria you specify. You can split files into parts of a given size or into specified number of parts.

File Merge Helper This dialog walks you through the process of combining multiple files into one using specified options and merge mode. File Hash Calculator This dialog lets you specify how you want the file hashes to be generated and where the output should be saved. Alternative User Interface Theme.

Alternative UI Theme If you do not like the default glass-like Aero theme with translucency effects, or if your Operating System does not support it, this alternative theme is available and can be easily made the default. Other Features. The functionality offered by Batch RegEx can be extended in the following ways: Software Development Kit SDK will let you develop your own actions and conditions that can be directly used by the product just as built-in ones.

All that is required is basic knowledge of either C , F , or VB. NET and Microsoft. NET Framework 3.



0コメント

  • 1000 / 1000