Creating Batch Files for Automated Drag and Drop Process

In summary, a user is trying to create batch files without any programming experience in DOS. They want to automate a 'drag and drop' procedure where a file from one directory is associated with an executable program in a different directory. They cannot associate the file extension with a program because they want files from different directories to be associated with different executable programs. They are seeking help and more information is needed to provide a specific solution.
  • #1
sean123
2
0
hi ladies and gents! this is my first post so excuse any stupidity on my part!

Basically I'm trying to create batch files but i have no programming experience in DOS. Fortunately I am only trying to achieve a simple goal.

I effectively want to automize a kind of 'drag and drop' procedure: I want a program that takes a file from one directory and 'applies' it to an Exec program in another directory.

I can't just associate the file extension with a program, because i want files from different directories to be associated with different exec programs- even though the file extensions remain the same.

ie. All files in any given directory are to be associated with a particular program, but all files in another directory are to be applied with another program.

I probably need to expand on the info I've given so far, but any help is greatly appreciated.

Many thanks in advance!
 
Computer science news on Phys.org
  • #2
You do, as you surmise, need to expand on exactly what it is that you want but basically, if I understand it, you want to move an executable file (an EXE file) to another folder and cause it to execute there. That is very simply done using the COPY command to move the file and then just name the file (in the .BAT command file) to execute it.

I'd need more info to be specific about the file associations you want.
 

1. How do I create a batch file for automated drag and drop process?

To create a batch file for automated drag and drop process, you can use any text editor such as Notepad or Notepad++. First, write the commands that you want the batch file to execute. Then, save the file with a .bat extension. You can then double-click the batch file to run it and automate the drag and drop process.

2. Can I add multiple drag and drop actions in a single batch file?

Yes, you can add multiple drag and drop actions in a single batch file by using the "copy" or "move" commands. These commands allow you to specify the source and destination of the drag and drop action, so you can include multiple locations in one batch file.

3. Is it possible to schedule the execution of a batch file for automated drag and drop process?

Yes, you can schedule the execution of a batch file using the Windows Task Scheduler. This allows you to automate the drag and drop process at a specific time or on a recurring schedule.

4. How can I troubleshoot errors in my batch file for automated drag and drop process?

If your batch file is not working as expected, you can use the "echo" command to display the commands being executed. This will help you identify where the error is occurring. You can also use the "pause" command to pause the batch file after each command, so you can see the results and identify any errors.

5. Are there any limitations to using batch files for automated drag and drop process?

Batch files are limited in their ability to handle complex tasks and may not be suitable for all drag and drop processes. Additionally, they are only compatible with Windows operating systems. For more advanced automation, you may need to use a scripting language or software specifically designed for drag and drop automation.

Similar threads

Replies
10
Views
3K
Replies
15
Views
5K
  • Computing and Technology
Replies
16
Views
6K
  • Programming and Computer Science
Replies
10
Views
1K
  • Programming and Computer Science
Replies
3
Views
2K
  • Computing and Technology
Replies
2
Views
2K
  • Programming and Computer Science
Replies
1
Views
1K
  • Programming and Computer Science
Replies
18
Views
1K
  • Programming and Computer Science
Replies
2
Views
1K
  • Mechanical Engineering
Replies
6
Views
4K
Back
Top