| View previous topic :: View next topic |
| Author |
Message |
judasmaster
Joined: 28 Nov 2009 Posts: 2
|
Posted: Sat Nov 28, 2009 2:46 am Post subject: Need help copying an Embeeded file to a local folder |
|
|
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) |
|
| Back to top |
|
 |
|
|
support Site Admin
Joined: 13 Feb 2004 Posts: 299
|
Posted: Tue Dec 01, 2009 1:40 pm Post subject: |
|
|
Don't forget about quotes:
copy "%MYFILES%\sound1.wav" "c:\temp" |
|
| Back to top |
|
 |
judasmaster
Joined: 28 Nov 2009 Posts: 2
|
Posted: Tue Dec 01, 2009 10:29 pm Post subject: I figured it out. |
|
|
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! |
|
| Back to top |
|
 |
support Site Admin
Joined: 13 Feb 2004 Posts: 299
|
Posted: Tue Dec 01, 2009 11:25 pm Post subject: |
|
|
Please try:
echo %MYFILES%
should return:
C:\Documents and Settings\username\Local Settings\Application Data |
|
| Back to top |
|
 |
tbs2002
Joined: 21 Feb 2011 Posts: 6
|
Posted: Wed Mar 09, 2011 11:10 pm Post subject: |
|
|
| 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 ? |
|
| Back to top |
|
 |
|