Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: echo list of path(s) of file(s).  (Read 2067 times)

0 Members and 1 Guest are viewing this topic.

jokop2

  • Guest
echo list of path(s) of file(s).
« on: January 12, 2007, 01:53:51 PM »
I want to do a batch file 'pathof.bat' which echos list of path(s) of file(s).
the file 'pathof.bat' consists of only one line which is:

FOR %%f IN (%1) DO echo "%%~ff"

the program echos the correct path for these examples:
pathof anyfile
or
pathof subfolder/anyotherfile
or
pathof *.doc

but this program fails to echo the right path when I do:
pathof subfolder/*
because the batch program echos paths which discards the 'subfolder'
what shell I do?
thanks
jokop