Go Back   Computer Forums > General Computing > Programming
Join Computer forums Today

Thread Tools Search this Thread Display Modes
Old 04-11-2007, 06:06 PM   #1
Solid State Member
Join Date: Sep 2006
Posts: 9
Default !!!!HELP!!!! Auto exec and cmd commands HELP PLEASE!!!

I need to know how to write an autoexec and how to write a code that will move a file of my choice to another folder on the computer from a cd to a different folder.

Say I put a file onto a cd. I want it, without me clicking anything, to automatically move a file of my choice from the cd onto the desktop (or any other folder) on the computer.

I know theres something about making a notepad doc and typing in some code but could someone help me out with the code?

snowman15 is offline   Reply With Quote
Old 04-12-2007, 04:16 PM   #2
In Runtime
Daeva's Avatar
Join Date: Dec 2005
Posts: 407
Send a message via AIM to Daeva Send a message via MSN to Daeva Send a message via Yahoo to Daeva
Default Re: !!!!HELP!!!! Auto exec and cmd commands HELP PLEASE!!!

you have to write a batch file, and this may not work on all cd's, just so you know.
@echo off
copy %1 %2
enter that into a text document. Save the file as copyCD.bat
to run the program, place it wherever you like, then open up the command prompt.
start->run-> type cmd and press enter
from here, you need to locate your batch file
for starters it's better to put the batch file in the root of c:
so, with your command prompt open, type cd \
this will put you in c:, where your batch file is
now type this command
copyCD.bat d:\mycd\myfile.txt c:\
this will copy a file named myfile.txt from a folder named mycd to the root of c:.
Hope that helps, although it would be just as easy to just type copy in dos.
**Official Self-proclaimed glorified excessive (insert additional adjectives here) post editor/modifier.
Edit = Best feature ever
Daeva is offline   Reply With Quote

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

All times are GMT -5. The time now is 08:57 AM.

Powered by vBulletin® Version 3.8.8 Beta 4
Copyright ©2000 - 2016, vBulletin Solutions, Inc.
Search Engine Friendly URLs by vBSEO 3.6.0