What version of Windows is involved on the servers?
Main Topics
Browse All TopicsI have a BAT file process which has been used for several years by clients on their PCs without errors. The BAt files were used for taking a transaction file (called abstract file), renaming it, backing it up (to a shared network drive) and then FTPing it to a remote location.
Our installation is currently converting to a Citrix environment and I find that the process now receives errors, even when I change the BAT files to point to the shared drives. Usually the errors is invalid number of parameters.
Instead of attatching all of my BAT files to this question (and probably confusing you further) I have placed the statements in question in a DOC and explained each within.
I think you may detect a pattern: I need to know if syntax to execute each command is correct.
If you could give me assistance in solving these syntax errors, I would greatly appreciate this.
thanks
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
I am attempting to find out the Windows version.
The single versus double quote issue seemed to help.
The biggest hangup appears to be that a majority of my BAT files and data files are found at G:\Abstract Transfer Scripts, so I seem to have to prefix EVERYTHING with this for DOS to find it. That seems to be the biggest problem with syntax.
Usually, you just change to the appropriate folder once, and then apply your commands. Most reliable way:
pushd %~dp0
call mybatch.bat
do whatever
del mylogs.log
popd
The first line will change drive and folder to the one provided with the batch file (%0 is the batch file itself, %~dp0 is "drive, path of %0").
Pushd stores the actual working directory, and popd restores that. As a result, the folder you were in before is the same after execution.
That seems to make it run much more smoothly and then I only have to put in the working path in one place.
I do have a question (which is getting a syntax erro--possibly related to the pushd?):
The following command renames a file in a different (NOT the pushd) directory to append the date-time.
RENAME "G:\Abstract Transfer Scripts\TESTING\110209\COP
It is getting a "the syntax of the command is incorrect" error.
Any thoughts?
Thanks
Ok, I follow the syntax you are stating. However, how do I do the following (without a bunch of "CDs"):
rename [file in Directory A} to {file with time-date suffix into a different directory}?
EXAMPLE:
(This is being run from "G:\Abstract Transfer Scripts\TESTING\110209\" which will be my "pushd" directory)
RENAME "G:\Abstract Transfer Scripts\TESTING\110209\COP
????
Business Accounts
Answer for Membership
by: knightEknightPosted on 2009-11-02 at 07:55:06ID: 25720490
The only thing I see that looks out of bounds is the use of single-quotes instead of double-quotes in the XCOPY command. Change the single-quotes around the parameters to double-quotes.
However, I don't think this alone will resolve all the issues you are seeing.