Relative input folder path with command line input

Tool for Search and Replace across multiple files.
Post Reply
tbrinz
Posts: 1
Joined: Thu Jan 12, 2023 4:26 pm

Relative input folder path with command line input

Post by tbrinz »

Hi there. I've been running TextCrawler Pro from a command line interface to edit batches of files using a regular expression filter.

Code: Select all

"c:\Program Files (x86)\TextCrawler Pro\TextCrawler.exe" /b "c:\Users\my_name\my_lib\file.txc" /i "D:\Documents\me\Projects\ThisProject\ThisFolder" /r /c
I would like to be able to use relative paths in the command, rather than absolute paths. This is no problem with the executable file, and seems to work with the batch file name, but I have had no luck with using the input folder as a relative path. Is this possible to do with the command line interface?
User avatar
DigitalVolcano
Site Admin
Posts: 1730
Joined: Thu Jun 09, 2011 10:04 am

Re: Relative input folder path with command line input

Post by DigitalVolcano »

You might be able to do it using a DOS command line variable. %CD% substitutes with the current directory.

e.g
"C:\Program Files (x86)\TextCrawler Pro\textcrawler.exe" /i "%CD%\sub1\sub2"
Post Reply