Home | Blog | Software | Reviews and Features | Forum | Help | Donate | About us
topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • September 04, 2015, 11:33:56 AM
  • Proudly celebrating 10 years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Author Topic: Replace a text file input with a pipe or redirect for DDR?  (Read 4678 times)

springro

  • Charter Member
  • Joined in 2006
  • ***
  • Posts: 39
    • View Profile
    • Donate to Member
This is probably more of a dos command question than strictly DDR, but that's what I'm trying to get this to work with.

Here's it is:
Running a script command that uses a text file as it's input.  The text file is just a list of files and some other fixed info on each line.

Import.bat  cr.txt -t restore

What I'd like to do is replace the "cr.txt" input file with a value from DDR based on a file name.  Any way to do this?

The other option is to run a two step .bat that creates the .txt file first, but thought there might be a way to avoid this.

Thanks,
Rob


mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 35,012
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Donate to Member
Re: Replace a text file input with a pipe or redirect for DDR?
« Reply #1 on: May 07, 2009, 11:38:12 AM »
thats a very good question.. as you say a two step process might be the way to go, where you first run a batch (or other program language script) to create the cr.txt and then run the import.

there is no easier way that DDR has for creating text files for you.  i could add such a feature, but my feeling has been that it's more sensible to encourage people to use a real scripting language to do such things and launch those scripts, rather than doing some adhoc thing built into DDR.

springro

  • Charter Member
  • Joined in 2006
  • ***
  • Posts: 39
    • View Profile
    • Donate to Member
Re: Replace a text file input with a pipe or redirect for DDR?
« Reply #2 on: May 07, 2009, 11:46:02 AM »

Pipes or redirects can't do anything like this?

I didn't think so, but figured I'd check before I before I got started. 

Thanks!

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 35,012
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Donate to Member
Re: Replace a text file input with a pipe or redirect for DDR?
« Reply #3 on: May 07, 2009, 11:58:54 AM »
Pipes or redirects can't do anything like this?
well actually you might be able to -- i'm just not good enough at dos commandline stuff to know.