Version: 2008
Advanced Search
advertisement
advertisement

Forum display:

Coding & scripting: Batch file help (i already search google)

by Charlorne - 9/27/06 10:01 AM
advertisement
Post 1 of 9

Batch file help (i already search google)

by Charlorne - 9/27/06 10:01 AM

here is the code

@ echo off
Move /y C:\Program Files\2BrightSparks\SyncBack\*.html C:\delete
del /Q c:\delete\*.*


can anyone tell me what wrong with it? i keep getting wrong syntax and all the search in google show me that my syntax is correct. please help.

Post 2 of 9

See that space in Program Files?

by R. Proffitt Moderator - 9/27/06 10:18 AM In reply to: Batch file help (i already search google) by Charlorne

That's the reason the syntax is wrong. You'll need to fix that.

Bob

Post 3 of 9

o.k.....i still can;t find the solution

by Charlorne - 10/1/06 4:26 AM In reply to: See that space in Program Files? by R. Proffitt Moderator

its been a while, i still havn;t found the solution to replace the space in the Program Files. I use Program%20Files it don;t works. so can you suggest a solution for me, please?

Post 4 of 9

You'll need some quotemarks.

by R. Proffitt Moderator - 10/1/06 8:05 AM In reply to: o.k.....i still can;t find the solution by Charlorne

Such as...

copy "Program Files\*" overthere

Bob

Post 5 of 9

but....

by Charlorne - 10/2/06 2:40 AM In reply to: You'll need some quotemarks. by R. Proffitt Moderator

I try the syntax below

@ echo off
Move /y ''C:\Program%20Files\2BrightSparks\SyncBack\*.html'' C:\delete
del /Q c:\delete\*.*
pause

and i get the error

The system cannot find the path specified.
Could Not Find c:\delete\*.*
Press any key to continue . . .

PS: C:\delete\*.* is not giving any problem, its the move which is giving us problem

Post 6 of 9

Not C:\Program%20Files

by swisse - 10/2/06 4:55 AM In reply to: but.... by Charlorne

Your code should look like this:
@ echo off
Move /y ''C:\Program Files\2BrightSparks\SyncBack\*.html'' C:\delete
del /Q c:\delete\*.*

NOT:
@ echo off
Move /y ''C:\Program%20Files\2BrightSparks\SyncBack\*.html'' C:\delete
del /Q c:\delete\*.*

Because you don't have a directory with the name C:\Program%20Files - unless you really have one.

Swisse

Post 7 of 9

try this solution

by saido.org - 10/1/06 6:02 AM In reply to: Batch file help (i already search google) by Charlorne

at the command line,
del "C:\Program Files\2BrightSparks\SyncBack\*.html"

Post 8 of 9

Wrong del syntax

by swisse - 10/1/06 8:31 AM In reply to: Batch file help (i already search google) by Charlorne

Write it this way:
@ echo off
Move /y C:\Program Files\2BrightSparks\SyncBack\*.html C:\delete
del /Q c:\delete

Swisse

Post 9 of 9

Correction

by swisse - 10/1/06 8:59 AM In reply to: Wrong del syntax by swisse

Sorry, the original del code was correct. I agree with Bob. There should be quotation marks around C:\Program Files\2BrightSparks\SyncBack\*.html. So the code should read:
@ echo off
Move /y "C:\Program Files\2BrightSparks\SyncBack\*.html" C:\delete
del /Q c:\delete\*.*

Swisse

Forum legend:
Locked Locked thread
Moderator Moderator
CNET staff CNET staff
Samsung staff Samsung staff
Norton Authorized Support team Norton Authorized Support team
AVG staff AVG staff
Windows Outreach team Windows Outreach team
Dell staff Dell staff
Intel staff Intel staff
Powered by Jive Software