Page 1 of 1

CMD: Find Filename from %1 in batch-file

Posted: Wed Sep 30, 2009 10:14 am
by Peter2
If have a simple question regarding DOS/CMD commands:

I have a Link in my Windows "Sendto"-folder which is linked to a batch-file. In the batch file is the command

Code: Select all

set PathName=%1
which gives me the whole path like

Code: Select all

c:\test\support\hallo.txt
That is clear.

How to get only the filename?

Code: Select all

set fileName=???
Regards

Peter

Re: CMD: Find Filename from %1 in batch-file

Posted: Thu Mar 04, 2010 2:30 am
by XnTriq

Re: CMD: Find Filename from %1 in batch-file

Posted: Thu Mar 04, 2010 6:04 am
by Peter2
Thanks XnTriq

I will take a look.

Peter