[파이썬] 디렉터리마다 파일 n개씩만 다른 폴더로 복사하기
·
파이썬
import os import shutil import natsort as natsort NAME_PATH = os.path.join(os.getcwd() + '/training/') IMG_PATH = os.path.join(os.getcwd() + '/target/') PATH = os.getcwd() count = 0 one = os.listdir(IMG_PATH) one = natsort.natsorted(one) for i in one: two = natsort.natsorted(os.listdir(os.path.join(os.getcwd() + '/target/'+i+"/"))) for j in two: three = natsort.natsorted(os.listdir(os.path.join(..
[c#] FTP에서 디렉토리(Directory)와 파일(File) 불러오기
·
c#
💡 디렉토리와 파일을 구분하는 방법? 불러온 주소를 다시 덧붙여서 하위 디렉토리가 있는지 검사 → 하위 파일이나 디렉토리가 없는 경우, 검사하기 어려움 파일 접근 권한에 ‘d’가 붙은 지 검사 using System; using System.Collections.Generic; using System.IO; using System.Linq; using System.Net; using System.Text; using System.Text.RegularExpressions; using System.Threading.Tasks; namespace loadingFtp { internal class Class1 { public static void Main(String[] args) { Uri ftpUri = ..