How to? Getting pdir to display relative paths.

Nov 2, 2009
295
6
Chile
www.farah.cl
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?
 
Similar threads
Thread starter Title Forum Replies Date
C history is getting deleted under unknown circumstances Support 9
MikeBaas V19 getting non-responsive Support 1
WadeHatler Just started getting a message about Cloud Storage every time I start TCC 19 Support 3
Jay Sage Getting Quote Characters into a Toolbar Tab Support 12
M How to? List path getting short file and directory names... Support 10
M Why is this function getting these results in these circumstances? Support 6
R Command history getting reloaded Support 16
M Programmatically getting the console width in character Support 18
fpefpe escapes getting into program Support 10
D PDIR question Support 0
Phileosophos PDIR to list filenames without extensions? Support 2
vefatica PDIR and streams Support 1
vefatica PDIR with fixed-width unqualified filename? Support 2
W pdir returns diff results between tcc and tcmd - one is an error msg Support 5
thedave pdir /s Support 2
Emilio III pdir /f switch Support 1
D pdir ignores pm Support 2
WadeHatler pdir broken in 19.1 for directories with spaces Support 1
M WAD PDir not working correctly... Support 5
vefatica WAD Nested variable expansion in PDIR's @function[*]? Support 13
mfarah More on pdir's options: /(fq) Support 5
S PDIR and @LABEL questions Support 4
M How to? PDir on multiple wildcard patterns... Support 2
A pdir function usage Support 3
T How to? dir/pdir - 2nd level down only Support 7
JohnQSmith PDIR and descriptions Support 21
G WAD PDIR @IF bug, @WORD bug Support 8
S WAD PDIR: files with percent sign % in name cause not listing other files in directory Support 9
S WAD PDIR ignores exclusion ranges Support 1
M PDir format question... Support 3
M How to? "PDir" not working the way the I _thought _ the documentation said it does… Support 8
S WAD /Sn mishandled in DIR and PDIR, possibly elsewhere Support 15
S Fixed GPF in PDIR Support 3
S PDIR issue Support 1
M PDir causing Take Command/TCC to crash... Support 6
M A "PDir" issue... Support 16
M A simple question related to the "dir" (and "pdir") commands... Support 5
J pdir /b1 issue Support 20
M Missing PDir option... Support 5
J Maybe Not So Hard Pdir Question Support 1
S PDIR fails in 12.10.55 Support 3
J V12 PDIR failure Support 1
S PDIR command causes GPF Support 5
D pdir inconsistency Support 4
S PDIR has trouble processing filenames with embedded percent sign Support 3
P PDIR woes Support 0
gschizas pdir crashes horribly in one specific folder Support 5
S PDIR question Support 2
S pdir /(fq) not working Support 5
R Colored directory listing bug with pdir. Support 1

Similar threads