Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
OK, I hope I can explain this well enough for some genius to understand and help me out
Im going to make a batch file that will be loaded by right-clicking mp3 files and selecting "some option" from the context menu.
Assuming I save this batch file as: C:\Windows\test.bat
Now, on right-clicking an mp3 file I will have an option that, if selected, will perform the following run command: "C:\Windows\test.bat" %1
The %1 automatically sets the selected mp3s filepath as a variable called %1 in the batch file.
So lets say I rightclick on C:\music\coolsong.mp3 and select "the option" from the menu... C:\Windows\test.bat will now load up and have the variable %1 which = "C:\music\coolsong.mp3"
Now here is what I want to do with this %1 variable:
I want to create a new variable with the selected mp3s directory path instead of the filepath. So for this example I will need to somehow set a variable which = "C:\music\"
I really don't know what to do. All I want is to take the variable I already have ("C:\music\coolsong.mp3") and transform it to: "C:\music\"
I really hope somebody here can help me out.
If anything, maybe someone here knows of a forum that I can join which specializes in topics about creating batch files?? It would really help me out.
Thanks alot everyone.

Lisa23 been a WHILE since I did any programming, but seems to me that a simple if-then-else statement is all you need. What if you have the machine check for some keypress (flag) for example and if that key's depressed, change the name to whatever you enter, otherwise leave it alone? Forum? Sure there's one, dunno.
HTH.
Ed in Texas.

![]() |
getting back autoplay
|
Re-Install IE in Windows ...
|

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.
| Ads by Google |