Tekforums

Chat => Entertainment & Technology => Topic started by: Christopher Monkey on March 21, 2006, 16:12:05 PM

Title: Batch file
Post by: Christopher Monkey on March 21, 2006, 16:12:05 PM
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?
Title: Re:Batch file
Post by: brummie on March 21, 2006, 16:22:32 PM
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
Title: Re:Batch file
Post by: Brodieman on March 21, 2006, 17:07:17 PM
Quote from: 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


Or if it has problems with UNC paths try

Code: [Select]

net use z: \\Trolly\mond
copy z:\Video\MonD.ini C:\Program Files\Media on Demand\MonD Player 2.7\
net use d: /delete
Title: Batch file
Post by: Christopher Monkey on March 21, 2006, 21:01:29 PM
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?
Title: Re:Batch file
Post by: brummie on March 21, 2006, 21:04:49 PM
google for some proper help  ;)

http://aumha.org/a/batches.php soamt l;ike that mayhelp more
Title: Re:Batch file
Post by: BigSoy on March 21, 2006, 21:30:53 PM
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.
Title: Batch file
Post by: Christopher Monkey on March 21, 2006, 21:33:13 PM
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!!
Title: Re:Batch file
Post by: Serious on March 21, 2006, 23:20:19 PM
I think that the web might use %20 instead of spaces, worth a try at least :wink: