Computer Science Canada Batch file needed to pass on arguments. |
Author: | I Smell Death [ Tue Apr 22, 2008 8:15 pm ] |
Post subject: | Batch file needed to pass on arguments. |
I am in need of the text that i would put in a batch file as turing does not seem to be getting the arguments. Here's what i did. i went in to the command line and typed the following assoc .abcde=TestAssociation ftype TestAssociation=C:\1.exe %1 with 1.exe being the compiled version of my program. When i double clicked a file with the .abcde extension it ran the program but the program reported 0 arguments being passed to it. So i decided that i would work around the problem. (after spending hours in the registry making sure every thing was right) Now i just want the test for a batch file to do the following. I need a batch file that when started by a data file it saves that data files name in a differnt file for example when i double click on 1.abcde it would run a.bat which then saves the the C:/...1.abcde (the full file name and location) in a file z.txt it should be simple but when i tried the most i could get was to save the location of the .abcde file and not it's name. sofar i have spent about 6-8 hours on this problem. Edit: So some people have been helping me but we can't seem to get past here. @echo OFF echo %1>>z.txt it will output the location of the file until it encounters a space so a location that like this C:\Documents and Settings\1.abcde would be output like this C:\Documents Thanks ISD |
Author: | I Smell Death [ Wed Apr 23, 2008 9:58 am ] |
Post subject: | RE:Batch file needed to pass on arguments. |
I've resolved the issue. |