I'm trying to write the first argument of a command line in a file, but it works in command line and not with drag and drop.
The very simple batch file (test_echo.cmd
) is as following:
@echo OFF
echo %1 > echo_arg_in_file.txt`
On the command line,
C:\rep>test_echo.cmd "C:\rep\fichier de test.txt"`
creates a file echo_arg_in_file.txt
with "C:\rep\fichier de test.txt"
written inside.
But with a drag and drop of the file "C:\rep\fichier de test.txt"
on the batch file, nothing happens... (the test to delete > echo_arg_in_file.txt
was done before and displays well "C:\rep\fichier de test.txt"
)
Any explanation?