Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

Manipulating %~f1 type of variables

Knight026Knight026 Posts: 1Member
Hello all,

Please allow me to explain what I hope to achieve with the batch file I'm trying to create.

I have a bunch of .iso files (movies and TV shows) on a HDD(M:) that I would like to extract onto a second HDD (J:). I'm doing a for /R loop. I used the xcopy function to copy the entire tree structure on the first HDD to the second HDD. Here is some pseudocode I wrote

For /R PathIchoose %%A IN *.iso Do(
Get full pathname of current file in loop (which I can using %~fA) and store it in variable Fullpath.

Use string manipulation to remove the first letter in Fullpath (M:) and replace it with secondary HDD letter (J:)

7zip extract file %%A to path Fullpath

Can anyone please help me?
The problem I've stumbled into is that I can't store %%~fA in a variable that I can manipulate.
Thanks!

I'm running XP BTW.
Sign In or Register to comment.