1.

Solve : working on a bach for homwork to help clear thing up?

Answer»

I am trying to get a batch file work here is the codeCode: [Select]CLS
@Echo on
Rem =======who knows=======
pause
Rem =====This is my txt batch===
pause
echo off
K:
cd wugxp
Dir *.txt /w /P
cd ..\
k:
cd wugxp\games
Dir *.doc /w /p
xcopy ls.doc C:\longshot.doc /v/w/r
cd..\..\
and I keep on getting a error when it getting rdy to xcopy that reads
File creation error - A required privilege is not held by the client.
I'm trying to copy from drive K:\ to drive c:\ If you can help that be grate.
i got it fixed
mdf1,
I don't have a K: Drive. I used D: Drive. I did not use xcopy but instead used copy. I named the batch file kay.bat. The batch file, kay.bat listed first and then the output is listed. This should get you started. Good Luck

See Post # 10 below:billrich, i think its been told you before, use code tags when POSTING your code. make it easier to read. Put code tags also if you want to demonstrate the output of your batch/script.Ghost wrote:
"If you want to demonstrate the output of your batch/script."


To demonstrate the output is as important as the code.Quote from: billrich on March 21, 2009, 02:41:30 PM

Ghost wrote:
"If you want to demonstrate the output of your batch/script."


To demonstrate the output is as important as the code.

So, naturally- you cannot use code tags? You'll only get a sore head, BC_P, if you bang it against this particular BRICK wall.
Quote from: Dias de verano on March 21, 2009, 03:40:28 PM
You'll only get a sore head, BC_P, if you bang it against this particular brick wall.


you're probably right- it only looked like the MORTAR was CRACKING. Which is more important: The message or the vehicle?

We all should be clones of each other?


p.s. The code Tag was added. Don't worry; be happy.


To be the same as my fellow Clones, I must get a Tattoo@billrich, please see picture of what it means to put your code in code tags.

[attachment deleted by admin]To:
Ghost Clone,

Here is the code asked for by mdf1 in post # 1 above

From:
Bill Clone

Code: [Select]C:\>type kay.bat
@Echo OFF

D:

cd \
dir wu*


Pause
REM D: will take us from C:\ drive to D:\ drive; I do not have a K: drive

cd wugxp

Dir *.txt /w /p
cd \
REM Cd \ will return to root directory D:\

cd wugxp\games
Dir *.doc /w /p

REM The following copy will copy D:\wuxp\games\ls.doc to C:\longshot.doc

REM xcopy ls.doc C:\longshot.doc /v/w/r ( do you need xcopy? )

copy ls.doc C:\longshot.doc

C:\>
To:
Ghost Clone,

Here is the Output for the Kay.bat batch file:

From:
Bill Clone

Code: [Select]C:\>kay.bat
Volume in drive D is My Book
Volume Serial Number is 0850-D7C5

Directory of D:\

03/20/2009 09:24 PM <DIR> wugxp
03/20/2009 09:43 PM <DIR> wuxp
0 File(s) 0 bytes
2 Dir(s) 138,952,855,552 bytes free
Press any key to continue . . .
Volume in drive D is My Book
Volume Serial Number is 0850-D7C5

Directory of D:\wugxp

caavsetupLog.txt caisslog.txt christmas.txt
count.txt date.txt db.txt
disklog.txt for.txt homewk.txt
Instruct_for.txt listone.txt list_of_program_files.txt
log.txt noperiod.txt period.txt
pipe.txt show.txt str3.txt
task.txt temp1.txt testfilnam.txt
x.txt xmas.txt xxx.txt
z.txt zeke.txt
26 File(s) 828,670 bytes
0 Dir(s) 138,952,855,552 bytes free
Volume in drive D is My Book
Volume Serial Number is 0850-D7C5

Directory of D:\wugxp\games

ls.doc
1 File(s) 4,195 bytes
0 Dir(s) 138,952,855,552 bytes free
1 file(s) copied.

D:\wugxp\games>C:


Discussion

No Comment Found