beasty,
You do yourself a disservice by requesting stuff in dribs and drabs. Many responders will see your thread has 12 replies and figure they have nothing to add or the problem was solved. Better to split your request into multiple posts or ask all your questions in your first post.
Unless I missed a day in Batch Coding 101, The
call statement and the
pushd statement are unrelated. The
call is used in a batch file to give control to a secondary batch file located somewhere in your system. It sets up a mechanism so when the secondary file terminates, control is passed back to the calling program at the statement following the call which then continues executing.
The
pushd statement is like the
cd statement with benefits.
Pushd saves the current directory on the stack and then changes to the directory passed as the first argument on the command line. The opposite of
pushd is
popd which navigates to the directory pulled from the stack. The order is last in, first out (LIFO), so it pays to keep track of this info. It's useful on forums where the OP fails to mention path information.
Ex: c:\temp> pushd c:\windows
this will save the c:\temp directory on the stack and then navigate to the c:\windows directory.
Insert the call statement after the second
xcopy as
call scriptfromearlierpost.bat If the called file is not in the current directory you will need to supply path information. Same as for the file that ends up in the FTP folder.