How do I dynamically specify a file in DOS?
- by donde
I am trying to use c# in .net to run dos commands to ftp a a file. Technically, it calls a BAT file which calls a CMD file which executes the DOS code. It was up to the CMD file. The CMD fiel will work if I hardcode the path, but I need to dynamically specify the path of the file.
BAT File...
ftp.exe -s:%~dp0\mycmdfile.cmd
And in the cmd file...
open <my ost>
<my user name>
<my pw>
quote site cyl pri=1 sec=1 lrecl=1786 blksize=0 recfm=fb retpd=30
put <here is where I need the dynamic path> + localfilename remotefilename
quit