Group Blog
 
<<
กันยายน 2551
 
 123456
78910111213
14151617181920
21222324252627
282930 
 
3 กันยายน 2551
 
All Blogs
 

การ zip file แบบเลือกบาง file/folder/subfolder

กรณีผมเกิดปัญหาจาก SVN จะไปฝัง .SVN ในทุกที่ ดังนั้นเวลาที่จะเลือก code ไป Deploy หรือใช้งาน (ไม่ใช้ svn export ซึ่งบางไฟล์มันจะไม่อยู่ใน SVN)

เครื่องมือที่ใช้แก้ปัญหาก็คือ ... 7-zip ( //www.7-zip.org )

Download ติดตั้งแล้วลุย

ขั้นตอนที่ใช้คือ

1.สร้าง text file ... filelist.txt ซึ่งรายละเอียดข้างในจะเป็นลักษณะแบบนี้



2. นำไปวางไว้ที่ Folder ระดับบนสุด



3. เข้า command แล้วไปที่ Folder ที่วาง filelist.txt ไว้ แล้ว พิมพ์คำสั่ง



7z a update01012009.zip @filelist.txt -xr!*.svn -xr!*.Thumbs.db


โดย

7z : command
a : Add files to archive
update01012009.zip : file name
@filelist.txt : list file
-xr!*.svn : exclude filenames
-xr!*.Thumbs.db : exclude filenames




แค่นี้ก็เรียบร้อย



สามารถประยุกต์ใช้กับการ zip ไฟล์ที่เวลาเราต้องเลือกแบบนี้ บ่อยๆ ได้ด้วย

เมื่อต้องการเพิ่ม หรือลด ก็แค่แก้ filelist.txt


หวังว่าคงเป็นประโยชน์นะครับ

ปล. รูปแบบคำสั่ง






 

Create Date : 03 กันยายน 2551
0 comments
Last Update : 3 กันยายน 2551 1:04:00 น.
Counter : 3564 Pageviews.

ชื่อ :
Comment :
  *ใช้ code html ตกแต่งข้อความได้เฉพาะสมาชิก
 


หมายเลข 15
Location :
กรุงเทพฯ Thailand

[ดู Profile ทั้งหมด]

ฝากข้อความหลังไมค์
Rss Feed

ผู้ติดตามบล็อก : 1 คน [?]




Friends' blogs
[Add หมายเลข 15's blog to your web]
Links
 

 Pantip.com | PantipMarket.com | Pantown.com | © 2004 BlogGang.com allrights reserved.