DonationCoder.com forum
 
Read-only archive. This is a static copy of the DonationCoder.com forum. Reading and searching work as before; logging in, posting and private messages do not.
Archive of 2026-10-21 · About this archive · Main site

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

springro

  • Charter Member
  • Joined in 2006
  • ***
  • Posts: 41
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: 40,931
    • Gathering Badge
    • Plugin Coding Medal
    • Participated in NANY Challenge Seventeen Times
    • Cody Award
    • Coding Snacks
    • Volunteers/Staff
Re: Replace a text file input with a pipe or redirect for DDR?
« Reply #1 on: May 07, 2009, 04:38 PM »
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: 41
Re: Replace a text file input with a pipe or redirect for DDR?
« Reply #2 on: May 07, 2009, 04:46 PM »

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: 40,931
    • Gathering Badge
    • Plugin Coding Medal
    • Participated in NANY Challenge Seventeen Times
    • Cody Award
    • Coding Snacks
    • Volunteers/Staff
Re: Replace a text file input with a pipe or redirect for DDR?
« Reply #3 on: May 07, 2009, 04:58 PM »
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.

Original address: https://www.donationcoder.com/forum/index.php?topic=18220.0