1.

Solve : .bat file help needed......?

Answer»

If I launch a SIMPLE bat FILE from a path on a network:
\\WinSrv\cr5\Dept400\me\Testing\batFiles\

then the bat executes goes to a Unix path and grabs a file (my question is this) it should then place it in here:
\\WinSrv\cr5\Dept400\me\Testing\batFiles\
Since that was where the bat file was launched from ? But I am not getting that result. Testing it in the C:\ it worked fine from the WinSrv path it did not work.

Is there a better way?

notes: %1 = userID, %2 = userPW, %3 = fileName

Code: [Select]Echo %1> ftpcmd.txt
echo %2>> ftpcmd.txt
echo ascii>> ftpcmd.txt
echo prompt n>>ftpcmd.txt
echo cd /unixPath1/parts/parts2/b/xm/data/>> ftpcmd.txt
echo get %3>> ftpcmd.txt
echo bye >> ftpcmd.txt
ftp -s:ftpcmd.txt 100.11.100.01
del ftpcmd.txt
ren \\WinSrv\cr5\Dept400\me\Testing\batFiles\%3 %3.txt
quit


btw this is a really nice forum! It's got a different look and feel to it........nice job!Your post is hard to understnad.
Are you trying to move a file from your local; machine to a sever on the network?
Where is the batch file?
What is the detonation directory?
This notation:
Quote

notes: %1 = userID, %2 = userPW, %3 = fileName
Is a bit hard to follow. Can you just give the actual invocation? Or something very close. Like MAYBE:
Quote
myupload pinkpatty qwerty mybiki.jpg
You have the path name two different WAYS. Why?
Where did you expect the file to go?
What is the full name of the detonation you want?
Quote
Since that was where the bat file was launched from
Are you sure of that? Quote from: Geek-9pm on DECEMBER 18, 2009, 10:05:22 PM
Your post is hard to understnad.
Are you trying to move a file from your local; machine to a sever on the network?

I am using the get command from Unix server to a windows server; I am working from a pc on a network.
Once I log into Unix I cd /unixPath1/parts/parts2/b/xm/data Needed Is Here/>>

Quote from: Geek-9pm on December 18, 2009, 10:05:22 PM
Where is the batch file?
What is the detonation directory?

\\WinSrv\cr5\Dept400\me\Testing\batFiles\batFileIsHere.bat
\\WinSrv\cr5\Dept400\me\Testing\batFiles\destination Is Here also
I give up.Quote from: Geek-9pm on December 19, 2009, 12:53:47 PM
I give up.

I think I have it now:

Code: [Select]Echo %1> ftpcmd.txt
echo %2>> ftpcmd.txt
echo ascii>> ftpcmd.txt
echo prompt n>>ftpcmd.txt
echo cd /unixPath1/parts/parts2/b/xm/data/>> ftpcmd.txt
echo get "%3" "%3">> ftpcmd.txt
echo bye >> ftpcmd.txt
ftp -s:ftpcmd.txt 100.11.100.01
del ftpcmd.txt
lcd \\WinSrv\cr5\Dept400\me\Testing\batFiles\
ren "%3" "%3.txt"
quit
Glad I was able to help. Quote from: Geek-9pm on December 19, 2009, 06:33:17 PM
Glad I was able to help.

LOL


yeah, no matter how tough things got you never gave up!


Discussion

No Comment Found