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
  • December 04, 2016, 04:29:15 PM
  • 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: Folders in Drag and Drop??  (Read 9575 times)

springro

  • Charter Member
  • Joined in 2006
  • ***
  • Posts: 39
    • View Profile
    • Donate to Member
Folders in Drag and Drop??
« on: December 01, 2006, 02:53:41 PM »
Hi,

This might be a simple one that I'm just not getting.

I have a script that normally I just put into the directory where I need it to run kick it off.  It cycles through the files needed.

I'm having trouble finding a way to drop folders onto DDR that would then just run the script in each folder.

I thinked I worked around this before by dropping a file from a folder and just ignoring it's value - but there was only 1.  Here there are multiple folders, not as elegant to have to drag a file from each folder.

Thanks,
Rob

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 36,406
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Re: Folders in Drag and Drop??
« Reply #1 on: December 01, 2006, 03:09:46 PM »
d+d is very happy to have folders dropped on it and to process folders, you just have to make sure you've checked the right option on the far right.

Screenshot - 12_1_2006 , 3_08_11 PM.png

ps.
I actually have an updated version of D+D robot that i need to upload, with better support for running scripts and stuff (old version complained if you tried to run a non exe/bat script like perl, etc.)

springro

  • Charter Member
  • Joined in 2006
  • ***
  • Posts: 39
    • View Profile
    • Donate to Member
Re: Folders in Drag and Drop??
« Reply #2 on: December 01, 2006, 03:28:06 PM »

I see that feature, but what I need it to do is to basically CD to each of the directories that are dropped, not use the directory as a parameter.

I even tried:

cd %P;C:\Scripts\Bb\fixes_drapdroprobot.bat   (which then just simply launches fixes.vbs

(and then cd %A - which seemed better, but didn't work either).  The script is programmed to run only on the directory it's in, so it didn't like the cd method.

Does that make sense?  I'm still missing something?

Thanks again,
Rob


mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 36,406
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Re: Folders in Drag and Drop??
« Reply #3 on: December 01, 2006, 04:01:30 PM »
i understand what you are trying to do;
here is my memory and 2 possible solutions.

1) i think you might be able to do:
cd C:\Scripts\Bb\fixes_drapdroprobot.bat

which basically SHOULD mean, switch to the dropped folder directory and then run the script.


2) a cleaner more general solution would simply be to make a batch file or script which looks like:
cd "%1"
run C:\Scripts\Bb\fixes_drapdroprobot.bat

something like that.

in other words, d+d isnt great at running built in shell commands, so instead put them in a bat file and run the bat file, and let the bat file do the cd.

springro

  • Charter Member
  • Joined in 2006
  • ***
  • Posts: 39
    • View Profile
    • Donate to Member
Re: Folders in Drag and Drop??
« Reply #4 on: December 01, 2006, 04:24:19 PM »

 :Thmbsup: #2 worked great. 

Thanks again.

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 36,406
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Re: Folders in Drag and Drop??
« Reply #5 on: December 01, 2006, 04:37:21 PM »
you can see why i made it easier to run perl and other language scripts from d+d, because its common that we want to launch a small script on each entry, like the kind you are doing.

springro

  • Charter Member
  • Joined in 2006
  • ***
  • Posts: 39
    • View Profile
    • Donate to Member
Re: Folders in Drag and Drop??
« Reply #6 on: December 08, 2006, 07:38:27 AM »
Quote
you can see why i made it easier to run perl and other language scripts from d+d

No, I really can't see until you post the new one!   :D

Best,
Rob