Need help copying an Embeeded file to a local folder

Convert your BATch files into EXEcutable format in one click.
Post Reply
judasmaster
Posts: 2
Joined: Sat Nov 28, 2009 2:36 am

Need help copying an Embeeded file to a local folder

Post by judasmaster » Sat Nov 28, 2009 2:46 am

Hello!
I have a simple question, I think I might be donig something wrong.
I want to replace a *.wav file in a local folder with the one embeeded in my batch file using the MYFILES variable, however It just wont copy nor I can replace the file with it either.

This is an example of my very simple batch file


rename c:\temp\sound1.wav c:\temp\sound1old.wav
copy %MYFILES%\sound1.wav c:\temp


so far the only thing that works is the rename part, but I just cant get my embeeded *.wav file to copy, I tried to change the file name but still I can't make it work... It might be somethig really sipmple but I would appreciate the help. (b.t.w. I have all permissions to write on c:\temp)

support
Site Admin
Posts: 399
Joined: Fri Feb 13, 2004 1:05 pm

Post by support » Tue Dec 01, 2009 1:40 pm

Don't forget about quotes:

copy "%MYFILES%\sound1.wav" "c:\temp"

judasmaster
Posts: 2
Joined: Sat Nov 28, 2009 2:36 am

I figured it out.

Post by judasmaster » Tue Dec 01, 2009 10:29 pm

Hey thanx, I tried with the quotes, but for some reason it was still not working... I might have misstyped something...

However I found a way around it since the embeeded giles are decompressed on C:\Documents and Settings\username\Local Settings\Application Data folder by using:

copy "%USERPROFILE%\Local Settings\Application Data\sound1.wav" "C:\temp\sound1.wav"


It works just fine!

thanx for the support!

support
Site Admin
Posts: 399
Joined: Fri Feb 13, 2004 1:05 pm

Post by support » Tue Dec 01, 2009 11:25 pm

Please try:

echo %MYFILES%

should return:

C:\Documents and Settings\username\Local Settings\Application Data

tbs2002
Posts: 6
Joined: Mon Feb 21, 2011 1:08 pm

Post by tbs2002 » Wed Mar 09, 2011 11:10 pm

support wrote:Please try:

echo %MYFILES%

should return:

C:\Documents and Settings\username\Local Settings\Application Data
can you give me example ?
how to write it form beginning
do you mean :

echo %MYFILES%
copy "%USERPROFILE%\Local Settings\Application Data\sound1.wav" "C:\temp\sound1.wav"


is that what you mean ?

Post Reply