1 / 8

// dirctrl.cpp : ƒƒCƒ“ ƒvƒƒWƒFƒNƒg ƒtƒ@ƒCƒ‹‚Å‚·B

// dirctrl.cpp : ƒƒCƒ“ ƒvƒƒWƒFƒNƒg ƒtƒ@ƒCƒ‹‚Å‚·B. #include "stdafx.h". using namespace System;. using namespace System::IO;. int main(array<System::String ^> ^args). {. String^ sinfpath; String^ stgpath; String^ sifdirpath; String^ dateStr; if(args->Length<2){

matt
Download Presentation

// dirctrl.cpp : ƒƒCƒ“ ƒvƒƒWƒFƒNƒg ƒtƒ@ƒCƒ‹‚Å‚·B

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. // dirctrl.cpp : ƒƒCƒ“ ƒvƒƒWƒFƒNƒg ƒtƒ@ƒCƒ‹‚Å‚·B

  2. #include "stdafx.h"

  3. using namespace System;

  4. using namespace System::IO;

  5. int main(array<System::String ^> ^args)

  6. { • String^ sinfpath; • String^ stgpath; • String^ sifdirpath; • String^ dateStr; • if(args->Length<2){ • Console::WriteLine("Full path of the shot_inf.txt file and the root directory of SIF file storage should be specified."); • return 0; • } • sinfpath=args[0]; • stgpath=args[1]; • sifdirpath=stgpath+"sif"; • if(!Directory::Exists(stgpath)){ • Console::WriteLine("SIF directory: [{0}] not found.", sifdirpath); • Console::WriteLine("Please check the path."); • return 0; • } • //read date info. from shot_inf.txt • StreamReader^ sr = gcnew StreamReader(sinfpath); • try{ • dateStr=sr->ReadLine(); • } • finally{ • delete sr; • } • array<String^>^ tmpStr=dateStr->Split(','); //comma is delimiter • sifdirpath=sifdirpath+"\\"+tmpStr[5]; • if(!Directory::Exists(sifdirpath)){ • Directory::CreateDirectory(sifdirpath); • //Console::WriteLine("{0}", sifdirpath); //check • }

  7. return 0;

  8. }

More Related