News:

Tekforums.net - The improved home of Tekforums! :D

Main Menu

Batch file

Started by Christopher Monkey, March 21, 2006, 16:12:05 PM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

Christopher Monkey

i need a batch file that will copy a file from

"\\Trolly\mond\Video\MonD.ini"

to

"C:\Program Files\Media on Demand\MonD Player 2.7\"

There is possibly another folder in the Media on Demand folder named MonD Manager x.x which would obviously be first in line alphabetically.... any ideas?

brummie

IIRC, and bare in mind its been years since i needed a batch file TBH

Open up a text editor, add the line

copy \\Trolly\mond\Video\MonD.ini C:\Program Files\Media on Demand\MonD Player 2.7\

Then save as

batch.bat

Brodieman

Quote from: brummieIIRC, and bare in mind its been years since i needed a batch file TBH

Open up a text editor, add the line

copy \\Trolly\mond\Video\MonD.ini C:\Program Files\Media on Demand\MonD Player 2.7\

Then save as

batch.bat

Or if it has problems with UNC paths try


net use z: \\Trolly\mond
copy z:\Video\MonD.ini C:\Program Files\Media on Demand\MonD Player 2.7\
net use d: /delete

Christopher Monkey

Cheers gents... id got

copy \\Trolly\mond\Video\MonD.ini C:\Program Files\Media on Demand\MonD Player 2.7\

as my text... didnt have time to test it properly at work but it seemed to throw a wobbly about not finding the destination... i thought it was prob the whitespace  in the path?

brummie

google for some proper help  ;)

http://aumha.org/a/batches.php soamt l;ike that mayhelp more

BigSoy

Try

copy "source" "destination"

with the quotes.

You might want some /f or /y switches to overwrite an existing version of the file in the destination too.
"Within your 'purview'? Where do you think you are, some f**king regency costume drama? This is a government department, not some f**king Jane f**king Austen novel!"

Christopher Monkey

Cool.... i did google it, but was rushed and no results seemed to deal with the whitespace issue! Cheer for that link tho.... nice and usefull

[EDIT]Just seen BigSoys post.... I tried with quotes, but the file exists, so it might be the switches that are needed!!

Serious

I think that the web might use %20 instead of spaces, worth a try at least :wink: