Marty P Posted July 21, 2004 Share Posted July 21, 2004 I have a few files wich i would like to have in my documents after XP has been installed. Just a dir named 'backup' in 'my documents' I used this code but with no succes: COPY /Y "%systemdrive%\install\Backup" "%userprofile%\"What should be the code? Link to comment Share on other sites More sharing options...
MCT Posted July 21, 2004 Share Posted July 21, 2004 mkdir "%userprofile%\Backup"xcopy "%systemdrive%\install\Backup\*.*" "%userprofile%\Backup" /Y that will work Link to comment Share on other sites More sharing options...
sleepnmojo Posted July 21, 2004 Share Posted July 21, 2004 COPY /Y "%systemdrive%\install\Backup" "%userprofile%\my documents" Link to comment Share on other sites More sharing options...
Marty P Posted July 21, 2004 Author Share Posted July 21, 2004 mkdir "%userprofile%\Backup"xcopy "%systemdrive%\install\Backup\*.*" "%userprofile%\Backup" /Y that will workThat won't work! For me it didn't. Oke it maked a dir in c:/my documents and settings/administrator/Backup. But that is not the dir i want it in. I should be in 'mijn documenten' (=my documents)and second problem. There was nothing in the dir Backup.@Sleepnmojoare u sure your solution will work? I've tested many things with no succes. The above was the best so far because it did 'something'. So mayby your solution combined with MCT's? mkdir "%userprofile%\Mijn documenten\Backup" COPY /Y "%systemdrive%\install\Backup" "%userprofile%\Mijn documenten" Link to comment Share on other sites More sharing options...
MCT Posted July 21, 2004 Share Posted July 21, 2004 i just used %userprofile% 2 show u the syntax of the commandbut if u want the actual command (like sleepnmojo said)mkdir "%userprofile%\My Documents\Backup"xcopy "%systemdrive%\Install\Backup\*.*" "%userprofile%\My Documents\Backup" /Ythat should work Link to comment Share on other sites More sharing options...
enuffsaid Posted July 21, 2004 Share Posted July 21, 2004 Marty,What you want cannot be done during the unattended installation.If, for example, you copy a bunch of files to "mijn documenten" of the Marty profile (eg. C:\Documents and Settings\Marty\Mijn Documenten) during your unattended installation, you will create a "Marty" folder in your C:\Documents and Settings.Now... if you were to log on to Windows FOR THE FIRST TIME as Marty, Windows will see that there ALREADY is a "Marty" directory in C:\Documents and Settings. Windows will presume this is some old profile, and create a NEW PROFILE for Marty. Windows will most likely call this new profile MARTY.<COMPUTERNAME>, where <COMPUTERNAME> is the name of your computer.You will have to write a script that copies your files AFTER your first logon.Hope this clarifies a bit....Suc6,eNuffSaidEDIT:If your looking to do this after you've logged in, make sure to add the *.* as MCT said. Link to comment Share on other sites More sharing options...
MCT Posted July 21, 2004 Share Posted July 21, 2004 i got the impression he did wanna do that upon first logon :confused:regards Link to comment Share on other sites More sharing options...
BAM Posted July 21, 2004 Share Posted July 21, 2004 I agree there with Enuffsaid.. i think..After first logon make sure there will be a Runonce command written to the registry. then after next logon u Will have it executed.mkdir "%userprofile%\Mijn documenten\Backup"xcopy /E /Y "%systemdrive%\Backup" "%userprofile%\Mijn documenten\Backup"That's the code u were looking for! Notice the /E .... (use the /? thingy )But what is the point when u need to logon again???Then better of and faster when u just copie it by hand then.Another thing i don't know if it works at that stage of install: $Docs dir !!Who has the answer for that one? Link to comment Share on other sites More sharing options...
Marty P Posted July 21, 2004 Author Share Posted July 21, 2004 I have a aplications.cmd. copy the backup is in that cmd. @BAM: this worked: mkdir "%userprofile%\Mijn documenten\Backup"This didn't work:xcopy /E /Y "%systemdrive%\Backup" "%userprofile%\Mijn documenten\Backup"meaning, there was nothing in the backup dirSo another tip please Link to comment Share on other sites More sharing options...
sleepnmojo Posted July 21, 2004 Share Posted July 21, 2004 try adding a /I to your xcopy command. Link to comment Share on other sites More sharing options...
BAM Posted July 21, 2004 Share Posted July 21, 2004 Strange one, because i tested it before replying to you..I tested it again (only i use the UK version) with the drivers dir from the root of my system.mkdir "%userprofile%\My Documents\test"xcopy /E /Y "%systemdrive%\drivers" "%userprofile%\My Documents\test"It copied over ALL over the drivers to my test dir!!Are u sure that all of the "backup" data u mean are in the root of the C:\ partition?And is there something in it? For ure info: try the Xcopy /? from the command box, here u get all the switches u may want to use.Let me/us know if it isn't/is going to work. Link to comment Share on other sites More sharing options...
Marty P Posted July 21, 2004 Author Share Posted July 21, 2004 Well i've tested it with this try adding a /I to your xcopy command. and that did the job. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now