| | |
| Stránka: 1 z 1
| [ Príspevok: 1 ] | |
Autor | Správa |
---|
Registrovaný: 06.11.09 Prihlásený: 06.11.11 Príspevky: 72 Témy: 25 | Napísal psm: 22.03.2010 10:20 | |
|
Caute, vedel by mi niekto poradit ako premiestnit subor z jedneho adresara do druheho? Pouzivam programovaci jazyk c++/cli a nasiel som na nete iba tento zdrojovy kod, ktory ale sluzi iba na premiestnenie presne definovanych suborov. Dakujem
Kód: # int main() # { # Watcher::run(); # # String^ path = "C:\\way\\"; # String^ path2 = "C:\\way\\"; # try # { # # // Ensure that the target does not exist. # if ( File::Exists( path2 ) ) # File::Delete( path2 ); # # // Move the file. # File::Move( path, path2 ); # Console::WriteLine( "Súbor {0} bol premiestnený do {1}.", path, path2 ); # # // See if the original exists now. # if ( File::Exists( path ) ) # { # Console::WriteLine( "Originálny súbor ešte stále existuje." ); # } # else # { # Console::WriteLine( "Originálny súbor už neexistuje" ); # } # } # catch ( Exception^ e ) # { # Console::WriteLine( "Proces zlyhal: {0}", e ); # } # }
|
|
| Stránka: 1 z 1
| [ Príspevok: 1 ] | |
| Nemôžete zakladať nové témy v tomto fóre Nemôžete odpovedať na témy v tomto fóre Nemôžete upravovať svoje príspevky v tomto fóre Nemôžete mazať svoje príspevky v tomto fóre
|
|