Creating Batch Files for Automated Drag and Drop Process

  • Thread starter Thread starter sean123
  • Start date Start date
  • Tags Tags
    Batch files
Click For Summary
SUMMARY

The discussion focuses on creating batch files to automate a drag-and-drop process for executing programs in different directories. The user seeks to associate specific files from various directories with distinct executable programs, despite having the same file extensions. The solution involves using the COPY command to move files and executing them through a .BAT command file. Further clarification on file associations is necessary for a more tailored solution.

PREREQUISITES
  • Basic understanding of batch file scripting in Windows
  • Familiarity with the DOS command line interface
  • Knowledge of file paths and directory structures
  • Understanding of executable file formats, specifically .EXE files
NEXT STEPS
  • Research how to use the COPY command in batch files
  • Learn about creating and executing .BAT files in Windows
  • Explore file association techniques in Windows for batch processing
  • Investigate advanced batch scripting techniques for conditional execution
USEFUL FOR

Individuals looking to automate file handling processes, including system administrators, software developers, and users with basic scripting needs in Windows environments.

sean123
Messages
2
Reaction score
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
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.
 

Similar threads

Replies
10
Views
3K
Replies
10
Views
4K
  • · Replies 4 ·
Replies
4
Views
3K
Replies
15
Views
12K
  • · Replies 16 ·
Replies
16
Views
8K
  • · Replies 10 ·
Replies
10
Views
2K
  • · Replies 3 ·
Replies
3
Views
3K
  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 2 ·
Replies
2
Views
10K
  • · Replies 10 ·
Replies
10
Views
4K