Bart
Member
Registered: 19th Aug 02
Location: Midsomer Norton, Bristol Avon
User status: Offline
|
I have the following code which has started giving me an error. For a moment it worked (a few weeks) but for some reason its telling me "Invalid Number of Parameters" when copying the files accross. can anyone spot why?
everything works except the coping...
quote:
@echo off
type \\bridges1\Documents\space.txt
Color 0c
set /p name="Name of the Project:"
cls
ECHO Folders being created for %name%...
@echo off
ping 127.0.0.1 -n 2 -w 3000 > nul
mkdir %name%
mkdir %name%\Correspondance
mkdir %name%\Correspondance\Email
mkdir %name%\Correspondance\"General Documents"
mkdir %name%\Correspondance\"Letters & Faxes"
mkdir %name%\Correspondance\"Document Transmittal"
mkdir %name%\"Project Info"
mkdir %name%\"Project Info"\"Cables Schedules & Calcs"
mkdir %name%\"Project Info"\"Drawings"
mkdir %name%\"Project Info"\"Drawings"\"E - Electrical"
mkdir %name%\"Project Info"\"Drawings"\"M - Mechanical"
mkdir %name%\"Project Info"\"Drawings"\"C - Civil"
mkdir %name%\"Project Info"\"Drawings"\"P - Process & SLDs"
mkdir %name%\"Project Info"\"Drawings"\"G - General Arrangements"
mkdir %name%\"Project Info"\"Parts Lists"
mkdir %name%\"Project Info"\"PLC Software & Info"
mkdir %name%\"Project Info"\"Technical Construction File"
mkdir %name%\"Project Info"\"Technical Construction File"\"Project Calcs"
mkdir %name%\"Project Info"\"Technical Construction File"\"Certificates"
mkdir %name%\"Project Info"\"Technical Construction File"\"Data Sheets"
mkdir %name%\"Project Info"\"Client Docs (Specs etc)"
mkdir %name%\"Project Info"\"Site Details"
mkdir %name%\Financial
mkdir %name%\Financial\"Invoice & Stage Claim Info"
mkdir %name%\Financial\"Invoice & Stage Claim Info"\NTI
ECHO Security permissions being applied...
ping 127.0.0.1 -n 4 -w 3000 > nul
cacls %name%/Financial/"Invoice & Stage Claim Info" /G Stage:F Administrators:F System:F < \\bridges1\Documents\yes.txt
mkdir %name%\Financial\"Client Orders & Instructions"
mkdir %name%\Financial\"Supplier Quotations"
mkdir %name%\Financial\"Suppliers Invoices"
mkdir %name%\Financial\"Client Quotations"
mkdir %name%\"Quotation"
mkdir %name%\"Health & Safety"
mkdir %name%\"Health & Safety"\General
mkdir %name%\"Health & Safety"\"Inspections & Audits"
mkdir %name%\"Health & Safety"\"MS & RA"
mkdir %name%\Manuals
mkdir %name%\Manuals\"Operation & Maintenance"
mkdir %name%\Manuals\"Test Certification"
mkdir %name%\Manuals\Training
mkdir %name%\Photos
mkdir %name%\Planning
mkdir %name%\"Testing & Commissioning"
mkdir %name%\"Testing & Commissioning"\Manual
mkdir %name%\"Testing & Commissioning"\"Parameter Record"
mkdir %name%\"Testing & Commissioning"\"Test Docs"
cls
ECHO Standard documentation being created...
ping 127.0.0.1 -n 4 -w 3000 > nul
xcopy "\\bridges1\Documents\Document Issue Register.xls" "%name%\Correspondance\Document Transmittal\"
xcopy "\\bridges1\Documents\Document Register.xls" "%name%\Project Info\Drawings\E - Electrical\"
xcopy "\\bridges1\Documents\Extra Works (detailed) Template.doc" "%name%\Financial\Client Orders & Instructions"
xcopy "\\bridges1\Documents\Extra Works (Brief) Template.doc" "%name%\Financial\Client Orders & Instructions"
xcopy "\\bridges1\Documents\Site Extra Works (detailed) Template.doc" "%name%\Financial\Client Orders & Instructions"
ECHO Complete. Exiting...
@echo off
ping 127.0.0.1 -n 10 -w 3000 > nul
p.s i've added the ping's in so i can see what its doing.
[Edited on 04-06-2008 by Bart]
|
pow
Premium Member
Registered: 11th Sep 06
Location: Hazlemere, Buckinghamshire
User status: Offline
|
Was about to say DOS doesnt like spaces, but then you've got "'s round them
|
pow
Premium Member
Registered: 11th Sep 06
Location: Hazlemere, Buckinghamshire
User status: Offline
|
If it was working before, I'd be looking at the sorce files first.
|