Batch Scripting with Wildcards and full stops in the address path

Axehack

In Runtime
Messages
110
Location
http:\\www
I need to write a batch script which will copy a folder and all of its contents, Problem is, The address has variables and a full stop in the folder name:

%appdata%\mozilla\firefox\profiles\*.default\*

I can CD to that dir, but it will not copy, it does not like the * or the . in the address... Any help?

Iv tried putting quotation marks in all the usual places, to no avail
 
this has not been tested. provided as is. no warranties. use at your own risk.

Code:
@echo off
set START="%appdata%\mozilla\firefox\profiles\"
set DEST="c:\myfolder
for /R %START% %%f in (.default) do (xcopy /e /y %%f %DEST%)
 
Thanks, I believe there should only be 1 profile on each users roaming profile, so I used

mkdir C:\ffprofile

SET COPYCMD=/Y

for /D %j in (%APPDATA%\mozilla\firefox\profiles\*) do move %j C:\ffprofile\user.default

But if I find that some users (for whatever reason) have multiple profiles, I will try yours... Thanks again! +Rep
 
there's a thread rating link at the top of the thread. you can use this to express that you like the thread. also, there's the add reputation link next to the report post icon link. **wink wink, nudge nudge**
 
Back
Top Bottom