Jump to content
Strawberry Orange Banana Lime Leaf Slate Sky Blueberry Grape Watermelon Chocolate Marble
Strawberry Orange Banana Lime Leaf Slate Sky Blueberry Grape Watermelon Chocolate Marble

MSFN is made available via donations, subscriptions and advertising revenue. The use of ad-blocking software hurts the site. Please disable ad-blocking software or set an exception for MSFN. Alternatively, register and become a site sponsor/subscriber and ads will be disabled automatically. 



Sign in to follow this  
darksimoon

winrar sfx comment.txt through batch file

Recommended Posts

darksimoon    0

hello friends;

i am preparing winrar sfx file as portable application through batch file.

and i enter the options of the sfx file by comment.txt

but when i enter "TempMode" into the comment.txt by batch file,

somehow it doesn't extract the files into the temp file. Instead it extracts

the files into the current folder. I don't understand why.

below is my batch.cmd and comment.txt content;

how can i make the sfx file to extract the content into the temp folder ?

=========batch file=========

echo TempMode >> .\comment.txt

============================

=====comment.txt===========

;Created By Alberto

setup=FSCapture.exe

TempMode

Silent=2

Overwrite=1

===========================

As an alternative to this problem i decided to use "path=%temp%" instead of "TempMode".

but this time batch file converts "path=%temp%" to "path=C:\Users\alberto\AppData\Local\Temp"

in the comment.txt

=========batch file=========

echo path=%temp% >> .\comment.txt

============================

=======comment.txt=========

;Created By Alberto

setup=FSCapture.exe

path=C:\Users\myuser\AppData\Local\Temp

Silent=2

Overwrite=1

===========================

how can i make the batch file to write "path=%temp%" in to the comment.txt ?

That is to say, how can i solve TempMode issue at sfx file or path=%temp% issue at batch file ?

please help me about them.

best regards....

Share this post


Link to post
Share on other sites

Yzöwl    30

The usual method of escaping percent characters in batch files is by doubling them up!

>OUTFILE.EXT ECHO=%%TEMP%%

Share this post


Link to post
Share on other sites
jaclaz    906

The usual method of escaping percent characters in batch files is by doubling them up!

>OUTFILE.EXT ECHO=%%TEMP%%

Yes :thumbup

It is different between command line and batch, my bad :blushing: .

jaclaz

Share this post


Link to post
Share on other sites
darksimoon    0

dear Jaclaz; thank you very much for your help

dear Yzöwl; i did as you say and it worked out. :) thanks a lot.

and dear submix8c; i use both win xp and win 7. i also use the latest version of winrar. however there is no such a thing in the help file.

so i think best way is set the path=%temp%.

once again, thank you very much friends.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×