Blitz Posted January 3, 2007 Report Share Posted January 3, 2007 (edited) Ir divas kopesanas komandas. Copy un Xcopy. Palaizot katru atseviski ieksh cmd, viss stradaa smuki. Ja vinas izsaucu caur php ar system vai exec, tad 1) aiziet normali bet 2) itkaa izpildaas bet rada 0 files copied un protams neko nav aizkopejis. Respektivi, laizot caur cmd visu kopee, bet caur php, izradas ka nemaz nav ko kopeet. komandas: 1) Copy \\linux\pasutijumi.gdb\pasutijumi.gdb d:\ /y 2) Xcopy \\piii\d$\wwwroot d:\wwwroot /y /c /d /e /z Meiginaju vinas laist kaa atseviskas, tip system ("copy...") un system("Xcopy..."), kaa ari abas vienlaicigi system("copy.bat"). Pieminesu velreiz ka laizhot visas caur cmd, stradaa ideali. Un ar pirmo Copy komandu ari nav problemu, vienigi tas Xcopy. Kapec? Kapec taa notiek? Edited January 3, 2007 by Blitz Link to comment Share on other sites More sharing options...
4e4en Posted January 3, 2007 Report Share Posted January 3, 2007 pamēģini php komandu copy :) copy( source, destanation); Link to comment Share on other sites More sharing options...
bubu Posted January 3, 2007 Report Share Posted January 3, 2007 Nav gadījumā tev problēmas ar backslašiem? \ vs \\ ? Link to comment Share on other sites More sharing options...
Blitz Posted January 4, 2007 Author Report Share Posted January 4, 2007 (edited) 4e4en php nelabpraat stradaa ar tikla resursiem. bubu, ar backslashiem problemu nav. Izmeginaju visadi + laizot caur *.bat tacu ari tas pats gluks, un tur backslashiem nav nozimes. Edited January 4, 2007 by Blitz Link to comment Share on other sites More sharing options...
bubu Posted January 4, 2007 Report Share Posted January 4, 2007 Ah, zinu, kur ir vaina. Copy nav izpildāmais fails, bet gan shell komanda. Tb cmd.exe komanda. Tāpec tev to jālaiž caur cmd.exe (vai command.com Win98): "cmd /C copy source destionation" Link to comment Share on other sites More sharing options...
Blitz Posted January 4, 2007 Author Report Share Posted January 4, 2007 hmm, notiek tas pats. system("C:\winnt\system32\cmd.exe /c xcopy \\\piii\d$\wwwroot d:\wwwroot /y /c /d /e /z"); 0 File(s) copied system("C:\winnt\system32\cmd.exe xcopy \\\piii\d$\wwwroot d:\wwwroot /y /c /d /e /z"); 0 File(s) copied piebildisu ka copy stradaa labi, bet xcopy ir problemas. Link to comment Share on other sites More sharing options...
bubu Posted January 4, 2007 Report Share Posted January 4, 2007 Es tak teicu, ka copy ir shell komanda!! Nevis xcopy! xcopy.exe ir normāls izpildāmais fails. A slaši? c:\winnt\.. => c:\\winnt\\.. \\\piii\d$.. => \\\\piii\\d$.. Link to comment Share on other sites More sharing options...
Blitz Posted January 4, 2007 Author Report Share Posted January 4, 2007 aaa sajaucu. Tatad xcopy.exe ir parasts aizpildamais fails kuram var padot parametrus tiesi ta pat ka to daru caur cmd. Cik saprotu tad shaadi: system("C:\\winnt\\system32\\xcopy.exe \\\\piii\\d$\\wwwroot d:\\wwwroot /y /c /d /e /z"); meiginaju ari saadi, ko atradu vienaa manualii: system("C:\\winnt\\system32\\xcopy.exe /y /c /d /e /z \"\\\\piii\\d$\\wwwroot\" \"d:\\wwwroot\" "); bet atkal nestradaa. Ko es nesapratu? Link to comment Share on other sites More sharing options...
bubu Posted January 4, 2007 Report Share Posted January 4, 2007 " aa " zz " cc " Pasaki tagad lūdzams, kādu stringu es te esmu uzrakstījis? Kļūdu paziņojumus nemaz neskaties? Link to comment Share on other sites More sharing options...
Blitz Posted January 4, 2007 Author Report Share Posted January 4, 2007 tec tur ir aa un cc, bet neredzu tam saistibu ar manejo. Es tacu " eskeipoju. Bet butiba jau no taa nemainaas. Nestradaa ne taa, ne taa. p.s. nekadi kludu pazinojumi nav. Link to comment Share on other sites More sharing options...
Val Posted January 4, 2007 Report Share Posted January 4, 2007 Nav vai netiek rādīti? Link to comment Share on other sites More sharing options...
bubu Posted January 4, 2007 Report Share Posted January 4, 2007 tec tur ir aa un cc, bet neredzu tam saistibu ar manejo. Es tacu " eskeipoju. Ui sorry, kautkā šķībi acis aizgāja, nepamanīju tavus eskeipojumus ;) Link to comment Share on other sites More sharing options...
Blitz Posted January 4, 2007 Author Report Share Posted January 4, 2007 Errori nevis netiek raditi bet vinu nav. Kaa jau teicu xcopy ta izpildas bet neizpildaas pareizi. Bezmazvai jasak rakstit sava konsoles aplikacija kas to visu izdariis. Link to comment Share on other sites More sharing options...
Blitz Posted January 8, 2007 Author Report Share Posted January 8, 2007 (edited) Ja kadam gadas kas lidzigs, tad parbaudiet vai apache strada ar tadu lietotaju kam ir tiesibas darboties ar tikla resursiem zem domain kontroleta tikla :) + tas pats attiecas uz windows wokstation. Nomainit var zem services- propertiji- logon (xp, 2000). Edited January 8, 2007 by Blitz Link to comment Share on other sites More sharing options...
Recommended Posts