corsasport.co.uk
 

Corsa Sport » Message Board » Off Day » Geek Day » Batch File Issue


New Topic

New Poll
  Subscribe | Add to Favourites

You are not logged in and may not post or reply to messages. Please log in or create a new account or mail us about fixing an existing one - register@corsasport.co.uk

There are also many more features available when you are logged in such as private messages, buddy list, location services, post search and more.


Author Batch File Issue
Bart
Member

Registered: 19th Aug 02
Location: Midsomer Norton, Bristol Avon
User status: Offline
4th Jun 08 at 08:43   View User's Profile U2U Member Reply With Quote

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

Avatar

Registered: 11th Sep 06
Location: Hazlemere, Buckinghamshire
User status: Offline
4th Jun 08 at 09:01   View Garage View User's Profile U2U Member Reply With Quote

Was about to say DOS doesnt like spaces, but then you've got "'s round them
pow
Premium Member

Avatar

Registered: 11th Sep 06
Location: Hazlemere, Buckinghamshire
User status: Offline
4th Jun 08 at 09:03   View Garage View User's Profile U2U Member Reply With Quote

If it was working before, I'd be looking at the sorce files first.

 
New Topic

New Poll

  Related Threads Author Forum Replies Views Last Post
Batch file writing Skinz Geek Day 3 725
6th Jul 05 at 11:32
by loafofbrett
 
Autorun/Commands Dan Lewis Geek Day 2 430
20th Oct 06 at 13:18
by almost_me
 
Need to convert a batch file into VBScript Richie Geek Day 6 600
18th Oct 07 at 23:05
by Richie
 
Batch File help Dan Lewis Geek Day 6 246
23rd Nov 07 at 09:40
by Dan Lewis
 
AD / LDIFDE Guru's jamesw Geek Day 4 151
17th May 08 at 21:04
by jamesw
 

Corsa Sport » Message Board » Off Day » Geek Day » Batch File Issue 29 database queries in 0.0260029 seconds