1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

How to? Getting pdir to display relative paths.

Discussion in 'Support' started by mfarah, Oct 20, 2013.

  1. mfarah

    Joined:
    Nov 2, 2009
    Messages:
    226
    Likes Received:
    5
    I usually run pdir as this:

    servero 0 C:\Users\Miguel\Documents>pdir /(dymd thms z fpn)
    20130828 165242 <DIR> C:\Users\Miguel\Documents\ChileIndomito
    20130828 165516 <DIR> C:\Users\Miguel\Documents\fonts
    20130914 214247 <DIR> C:\Users\Miguel\Documents\Plantillas personalizadas de Office
    20130829 123458 <DIR> C:\Users\Miguel\Documents\viejasPeladoras
    20130726 174617 1042986 C:\Users\Miguel\Documents\6ad1525e-8a2a-4df0-a435-4d7d7a389895.pdf
    20130723 144906 2461354 C:\Users\Miguel\Documents\dozuki_tech_writing_handbook.pdf
    20130803 162236 151904890 C:\Users\Miguel\Documents\FiveYearsofStories.mobi
    20130803 163848 510374942 C:\Users\Miguel\Documents\FiveYearsofStories.pdf
    20030309 133407 200554 C:\Users\Miguel\Documents\iiss.zip
    20131016 182802 2050468 C:\Users\Miguel\Documents\java.txt
    20130829 095019 111608927 C:\Users\Miguel\Documents\logs_apache2_Antonia6_todo.zip
    20131016 175322 116 C:\Users\Miguel\Documents\qc.btm
    20131016 183259 2045358 C:\Users\Miguel\Documents\tcc.txt


    There are times, however, where I'd rather get a relative path, like this:

    servero 0 C:\Users\Miguel\Documents>pdir /(dymd thms z f?n)
    20130828 165242 <DIR> .\ChileIndomito
    20130828 165516 <DIR> .\fonts
    20130914 214247 <DIR> .\Plantillas personalizadas de Office
    20130829 123458 <DIR> .\viejasPeladoras
    20130726 174617 1042986 .\6ad1525e-8a2a-4df0-a435-4d7d7a389895.pdf
    20130723 144906 2461354 .\dozuki_tech_writing_handbook.pdf
    20130803 162236 151904890 .\FiveYearsofStories.mobi
    20130803 163848 510374942 .\FiveYearsofStories.pdf
    20030309 133407 200554 .\iiss.zip
    20131016 182802 2050468 .\java.txt
    20130829 095019 111608927 .\logs_apache2_Antonia6_todo.zip
    20131016 175322 116 .\qc.btm
    20131016 183259 2045358 .\tcc.txt


    I can't find an easy way to do this directly. Sure, I could pass the output to a search&replace command (or edit the resulting text file by hand, which is what I'm doing currently), but I'd rather avoid that.

    Any ideas? Or perhaps implement a new /(f...) option?
     
  2. rconn

    rconn Administrator
    Staff Member

    Joined:
    May 14, 2008
    Messages:
    9,804
    Likes Received:
    82
    I don't understand your purpose here -- you just want to prefix a ".\" to all the filenames? (That's easily done, though I don't know why you'd want to make everything harder to read!)

    Or is this example missing a /S option?
     
  3. mfarah

    Joined:
    Nov 2, 2009
    Messages:
    226
    Likes Received:
    5
    Yes, the idea is to use this with the /S option (I should have mentioned that).
     

Share This Page