chrismartz Posted January 8, 2006 Report Share Posted January 8, 2006 I'm writing a batch file to copy a file from one location to another. The problem I'm having is trying to move the file to a firefox profile folder. The profile will not be the same for other users so I can't hard code this. Is there a wildcard for folder names that I could use? Below is my current code.COPY "%CD%\userContent.css" "%APPDATA%\Mozilla\Firefox\Profiles\8338gccg.default\chrome" Quote Link to comment Share on other sites More sharing options...
scuzzman Posted January 8, 2006 Report Share Posted January 8, 2006 Which part is the part that is changing? Quote Link to comment Share on other sites More sharing options...
chrismartz Posted January 8, 2006 Author Report Share Posted January 8, 2006 The "8338gccg.default" folder will be different. Quote Link to comment Share on other sites More sharing options...
scuzzman Posted January 8, 2006 Report Share Posted January 8, 2006 The only working thing I think might work would be to use an asterisk (*) to put it in all directories... but if there are additional files there, there may be a problem... Quote Link to comment Share on other sites More sharing options...
chrismartz Posted January 9, 2006 Author Report Share Posted January 9, 2006 I triedCOPY "%CD%\userContent.css" "%APPDATA%\Mozilla\Firefox\Profiles\*\chrome"but then it's looking for the folder with the name of * Quote Link to comment Share on other sites More sharing options...
ɹəuəllıʍ ʇɐb Posted January 9, 2006 Report Share Posted January 9, 2006 Batch script commands are mostly original DOS commands, and I am sorry to say that they have never evolved to support wildcard characters. I currently have no idea how you could do that. Maybe there is some advanced scripting somewhere out there...? Quote Link to comment Share on other sites More sharing options...
chrismartz Posted January 9, 2006 Author Report Share Posted January 9, 2006 There is an ini file that I could read the folder name from If anyone knows how I can set a batch variable equlal to what the ini file contains. Does anyone know about this? Quote Link to comment Share on other sites More sharing options...
chrismartz Posted January 10, 2006 Author Report Share Posted January 10, 2006 I got it figured out.c:cd %APPDATA%\Mozilla\Firefox\Profiles\*.default\chromeCOPY "%userprofile%\desktop\userContent.css"ECHO File Installed! You must restart Firefox for these changes to take effect...PAUSEAlthough, the install.bat as well as the userContent.css have to be on the desktop for it to work. Quote Link to comment Share on other sites More sharing options...
ɹəuəllıʍ ʇɐb Posted January 11, 2006 Report Share Posted January 11, 2006 In other words, the CD command does now support wildcard characters.Thanks for letting us know the solution. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.