How do I specify a relative local file path in DOS?

Posted by donde on Stack Overflow See other posts from Stack Overflow or by donde
Published on 2010-06-02T13:26:01Z Indexed on 2010/06/02 13:34 UTC
Read the original article Hit count: 187

Filed under:

I am using c#.NET 2.0 to execute DOS commands to ftp a file. All works except for 1 thing, in the cmd file I call, it runs a PUT statement. Right now the put statement has a hardcoded local file path. I need to specify a dynamic path. I've tried

put %~dp0\myfile.DTL myfile.dtl

but it says it can't find the file.

© Stack Overflow or respective owner

Related posts about dos