Major Posted May 19, 2006 Share Posted May 19, 2006 Hi Men, I have read how to use the command filecopy but without success for me.I have WPI 4.3.8, and the commands are:pn=1;prog[pn]=['WinRaR 3.51']uid[pn]=['WinRaR351']picw[pn]=['128']pich[pn]=['128']textl[pn]=['Bottom']texti[pn]=['1']cmd1[pn]=['%SystemDrive%\\wpi.4.3.8\\install\\WinRaR.3.51\\wrar351es.exe /S']cmd2[pn]=['FILECOPY %SystemDrive%\\wpi.4.3.8\\Install\\WinRaR.3.51\\RaRReg.key %PROGRAMFILES%\\WinRAR\\']cmd3[pn]=['FILECOPY %SystemDrive%\\wpi.4.3.8\\Install\\WinRaR.3.51\\WinRAR.exe %PROGRAMFILES%\\WinRAR\\']cmd4[pn]=['REGEDIT /S %SystemDrive%\\wpi.4.3.8\\install\\WinRaR.3.51\\Settings.reg']dflt[pn]=['yes']configs[pn]=['yes']cat[pn]=['Compresion']pn++Thanks Link to comment Share on other sites More sharing options...
Kelsenellenelvian Posted May 19, 2006 Share Posted May 19, 2006 You want a easier way to do it with compression?Using WinRAR you can select both files and have them extracted to %programfiles%\Winrar silently. and if you select the right modes under modes it will run silently without switches.If you want more help with making an sfx file I will post a detailed instruction on how to do it.As for the filecopy command not working I am looking into it. Link to comment Share on other sites More sharing options...
Kelsenellenelvian Posted May 19, 2006 Share Posted May 19, 2006 OK I did some reseach and it looks like windows XP has some issues with the "fliecopy" command so it might not be WPI's fault. As solution all you need is the copy command and here is a set of instructions for the copy command in Windows XP...COPY Copy one or more files to another locationSyntax COPY source destination [options] COPY source1 + source2.. destination [options]Key source : Pathname for the file or files to be copied. /A : ASCII text file (default) /B : Binary file copy - will copy extended characters.destination : Pathname for the new file(s). /V : Verify that the new files were written correctly. /N : If at all possible, use only a short filename (8.3) when creating a destination file. This may be necessary when copying between disks that are formatted differently e.g NTFS and VFAT, or when archiving data to an ISO9660 CDROM. /Z : Copy files in restartable mode. If the copy is interrupted part way through, it will restart if possible. (use on slow networks) /Y : Suppress confirmation prompt (Windows 2000 only) /-Y : Enable confirmation prompt (Windows 2000 only)Prompt to overwrite destination fileNNT 4 will overwrite destination files without any prompt, Windows 2000 and above will prompt unless the COPY command is being executed from within a batch script.To force the overwriting of destination files under both NT4 and Windows2000 use the COPYCMD environment variable: SET COPYCMD=/Y This will turn off the prompt in Win2000 and will be ignored by NT4 (which overwrites by default)Binary copies"COPY /B ... " will copy all the files in binary mode , you can also put /B after any one file to copy just that file in binary. Combine files To combine files, specify a single file for the destination, but multiple files as the source. To specify more than one file use wildcards or list the files with a + in between each (file1+file2+file3)When copying multiple files in this way the first file must exist or else the copy will fail, a workaround for this is COPY null + file1 + file2 dest1COPY will accept UNC pathnames Examples:In the current folderCOPY oldfile.wp newfile.docFull path specifiedCOPY g:\department\oldfile.wp "c:\Files to Convert\newfile.doc"Specify the drive and filename (assumes the current folder on both drives is correct)COPY a:oldfile.wp c:newfile.docSpecify source only (will copy the file to current folder, keeping the same filename)COPY g:\department\oldfile.wp Quiet copy (no feedback on screen)COPY oldfile.wp newfile.doc >nul Link to comment Share on other sites More sharing options...
Major Posted May 19, 2006 Author Share Posted May 19, 2006 Thank you very much, i will try it Link to comment Share on other sites More sharing options...
Major Posted May 21, 2006 Author Share Posted May 21, 2006 I thing that i have found the error but not the solution. I have tried with diferent commands and i found when i put %programfiles%, it did not recognize it.well, i create a directory in "C" called: prueba and i tried the command, it works perfectly. I have tried it also with "CMD /C COPY" and it works well. the problem is when i put "%ProgramFiles\\Prueba\\". How can i solve the problem in order to recognize the directory %ProgramFiles%. Thankspn=1;prog[pn]=['WinRaR 3.51']uid[pn]=['WinRaR251']picw[pn]=['128']pich[pn]=['128']textl[pn]=['Bottom']texti[pn]=['1']cmd1[pn]=['FILECOPY %SystemDrive%\\wpi.4.3.8\\Install\\WinRaR.3.51\\Instalar.txt %SystemDrive%\\Prueba\\']dflt[pn]=['yes']configs[pn]=['yes']cat[pn]=['Compression Utilities']pn++ Link to comment Share on other sites More sharing options...
Major Posted May 21, 2006 Author Share Posted May 21, 2006 I have found the solution, well If put this commandcmd1[pn]=['FILECOPY %SystemDrive%\\wpi.4.3.8\\Install\\WinRaR.3.51\\Instalar.txt %PROGRAMFILES%\\Prueba\\'] it does not work.but if i put this command between " " it works perfectlycmd1[pn]=['FILECOPY %SystemDrive%\\wpi.4.3.8\\Install\\WinRaR.3.51\\Instalar.txt "%PROGRAMFILES%\\Prueba\\"']Thanks Link to comment Share on other sites More sharing options...
poppyq Posted June 1, 2006 Share Posted June 1, 2006 Just for reference, that fixes it because without the quotes it'll show as:C:\Program Files\Prueba but it will only read up to the space so it's looking for the directory C:\Program which doesn't exist. With the quotes it knows to look for the full directory. Link to comment Share on other sites More sharing options...
Maeggor Posted April 22, 2010 Share Posted April 22, 2010 (edited) Maybe someone can help me, because i dont get the way to use this command. The thing is that I install a program and I want then to copy a file into its folder. I use this commandprog[pn]=['CrystalDiskMark v3.00b'];uid[pn]=['CRYSTALDISKMARK'];desc[pn]=['CrystalDiskMark mide la velocidad de lectura y escritura de tus unidades de disco duro. Con esta sencilla utilidad podrás detectar errores y problemas físicos en la superficie del disco o en la aguja lectura. Si sospechas que algo no va bien en el disco o escuchas un ruido raro, no estaría de más y utilizar CrystalDiskMark para asegurarte.'];dflt[pn]=['no'];forc[pn]=['no'];bit64[pn]=['no'];cat[pn]=['Benchmarks y Hardware'];cmds[pn]=['"%wpipath%\\Install\\APPs_FREE\\CrystalDiskMark\\CrystalDiskMark3_0_0b-en.exe /verysilent"'];cmds[pn]=['FILECOPY %wpipath%\\Install\\APPs_FREE\\CrystalDiskMark\\icon.ico "%PROGRAMFILES%\\CrystalDiskMark\\"'];picf[pn]=['CrystalDiskMark.png'];picw[pn]=['128'];pich[pn]=['128'];textl[pn]=['Top'];pn++;But the file icon.ico doesnt copy. I think I have tried all the ways but with no luck. Any ideas of why?By the way, I use WPI 7.70 Edited April 22, 2010 by Maeggor Link to comment Share on other sites More sharing options...
mritter Posted April 22, 2010 Share Posted April 22, 2010 Put both paths in quotes.And look at your log file. Spaces in paths the killer. Link to comment Share on other sites More sharing options...
spanni Posted April 28, 2010 Share Posted April 28, 2010 I have the same Problem under Windows Vista. I install the SAP SAPGui unattended. After that, a ini-File has to be copied to %SystemRoot%.the Lines in the Config-File:prog[pn]=['Sapguiconfig'];uid[pn]=['SAPGUICONFIG'];desc[pn]=['Sapguiconfig'];dflt[pn]=['yes'];forc[pn]=['no'];bit64[pn]=['no'];cat[pn]=['Applications'];cmds[pn]=['"FILECOPY "%wpipath%\\soft\\SAP\\saplogon.ini" "%SystemRoot%"'];pn++;I also tried it with copy /y. On a Command-Shell the copy /Y works perfectly, but not in WPI.Any clues how I can copy that file?RegardsSpanni Link to comment Share on other sites More sharing options...
mritter Posted April 28, 2010 Share Posted April 28, 2010 All I can say is use quotes and make sure destination path ends in a \. Link to comment Share on other sites More sharing options...
spanni Posted April 29, 2010 Share Posted April 29, 2010 Ok, the new line is:cmds[pn]=['FILECOPY "%wpipath%\\soft\\SAP\\saplogon.ini" "%SystemRoot%\"'];It does not work. Can you say me which quotation is wrong or where the "\" is missing? I can't see any fault.RegardsSpanni Link to comment Share on other sites More sharing options...
MrJinje Posted April 29, 2010 Share Posted April 29, 2010 (edited) cmds[pn]=['FILECOPY "%wpipath%\\soft\\SAP\\saplogon.ini" "%SystemRoot%\\"'];Think it needs to end with double \\Not sure on the quotes, if it don't work try this. He could have meant to include both paths in a single pair of quotes like so.cmds[pn]=['FILECOPY %wpipath%\\soft\\SAP\\saplogon.ini %SystemRoot%\\']; Edited April 29, 2010 by MrJinje Link to comment Share on other sites More sharing options...
spanni Posted April 29, 2010 Share Posted April 29, 2010 cmds[pn]=['FILECOPY "%wpipath%\\soft\\SAP\\saplogon.ini" "%SystemRoot%\\"'];Think it needs to end with double \\Sorry, my fault. I had double-Backslashes, wrote it wrong in my last post.Not sure on the quotes, if it don't work try this. He could have meant to include both paths in a single pair of quotes like so.cmds[pn]=['FILECOPY %wpipath%\\soft\\SAP\\saplogon.ini %SystemRoot%\\'];This failes also.I think I will make a batch-file which does the copy for me.RegardsDaniel Link to comment Share on other sites More sharing options...
mritter Posted April 29, 2010 Share Posted April 29, 2010 You're gonna kick yourself........{FILECOPY}You need the brackets.All commands need those. Link to comment Share on other sites More sharing options...
Recommended Posts