topbanner_forum
  *

avatar image

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

Login with username, password and session length
  • Thursday March 28, 2024, 2:41 pm
  • Proudly celebrating 15+ 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: Getting folders only  (Read 23380 times)

imtrobin

  • Charter Member
  • Joined in 2005
  • ***
  • default avatar
  • Posts: 125
    • View Profile
    • Donate to Member
Getting folders only
« on: August 09, 2005, 10:51 AM »
Hi,

I have question on using Drag Drop Robot 1.08 to zip up files. The sample shows using %2 as a source parameter to the zip program.

When I drag folders into DDR, it becomes like this e.g

c:\folders\folderA
c:\folders\folderB
c:\folders\folderC

What I want is to zip up the files without the C:\folders\.. ie only relative directory structure.

Anyway I can do that without putting all the folders in C:\ drive?


mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,896
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Re: Getting folders only
« Reply #1 on: August 09, 2005, 11:05 AM »
CAREFULLY try these (semi-documented) features:
   // %p = short path
   // %P = long path
   // %no = short name (without ext)
   // %NO = long name (without ext)
   // %n = short name (with ext)
   // %N = long name (with ext)
   // %e = extension

so i think if you drag+drop
c:\folders\folderA

then %p will be "C:\folders"
and %NO would be "folderA"

let me know if it works

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,896
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Re: Getting folders only
« Reply #2 on: August 09, 2005, 11:07 AM »
actually i've just read your post again
i think what you are asking is *not* how to get fields as i posted,

but you want to provide a commandline option to winzip to tell it only to store RELATIVE directory information?
is that right?

there should be a commandline option in zip/winzip for that.

imtrobin

  • Charter Member
  • Joined in 2005
  • ***
  • default avatar
  • Posts: 125
    • View Profile
    • Donate to Member
Re: Getting folders only
« Reply #3 on: August 09, 2005, 11:18 AM »
but you want to provide a commandline option to winzip to tell it only to store RELATIVE directory information?
is that right?

No. Actually I'm using winrar, but it is the same principle. The folders I drag in has the C:\Folders\folderA, and using %2 passes the whole string in meaning the zip file has a structure like so

Folders
  folderA

instead of just folderA. The %NO option works perfectly. thanks!

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,896
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Re: Getting folders only
« Reply #4 on: August 09, 2005, 11:48 AM »
cool  :up:

if you ever forget, these options are in the help file, in the "Tips+Tricks" section.

imtrobin

  • Charter Member
  • Joined in 2005
  • ***
  • default avatar
  • Posts: 125
    • View Profile
    • Donate to Member
Re: Getting folders only
« Reply #5 on: August 10, 2005, 12:03 PM »
The %NO options aren't documented.

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,896
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Re: Getting folders only
« Reply #6 on: August 10, 2005, 12:06 PM »
i might need to update the help file, i have it in mine.

imtrobin

  • Charter Member
  • Joined in 2005
  • ***
  • default avatar
  • Posts: 125
    • View Profile
    • Donate to Member
Re: Getting folders only
« Reply #7 on: August 10, 2005, 03:32 PM »
Hmm, I encountered a situation where the %NO doesn't work... when my folders have . in them.

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,896
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Re: Getting folders only
« Reply #8 on: August 10, 2005, 04:03 PM »
if you're only working with folders try %N

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,896
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Re: Getting folders only
« Reply #9 on: August 10, 2005, 04:03 PM »
did i mention i'm happy someone is actually using this programĀ  :)

requests for new features are welcome.

imtrobin

  • Charter Member
  • Joined in 2005
  • ***
  • default avatar
  • Posts: 125
    • View Profile
    • Donate to Member
Re: Getting folders only
« Reply #10 on: August 11, 2005, 12:46 AM »
thanks :)

I'm haven't investigated this yet, but does it take into account of the return value of the command line program?

ie. most programs return 0 if successful, or some other int otherwise.

So if the return value is an error, then print out a large warning red text in the redirected window.

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,896
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Re: Getting folders only
« Reply #11 on: August 11, 2005, 07:06 AM »
currently drag&drop doesnt pay attention to the return code, but thats a good idea for a feature to add as an option.