We are committed to provide service 24 X 7

Deals, Shopping, Training, Tools

Tag: Directory

C++ : Check if given path is a file or directory using Boost & C++17 FileSystem Library

In this article we will discuss different ways to check if given path is of file or directory that exists using Boost Filesystem Library & C++17 Filesystem Library. Both Boost Filesystem library & C++17 Experimental filesystem library provides certain functions that we are going to use here,  Advertisements bool exists(const path& p); In Boost Library’s …

C++ : Check if given path is a file or directory using Boost & C++17 FileSystem LibraryRead More

C++ : Get the list of all files in a given directory and its sub-directories using Boost & C++17

In this article we will discuss how to fetch the recursive list of all files in a given directory using Boost and C++17 FileSystem Library. Suppose we have a directory i.e. Advertisements /home/user/study/tutorials and I want list of all files in this directory and its sub directories, but also want to skip certain directory like …

C++ : Get the list of all files in a given directory and its sub-directories using Boost & C++17Read More

How to create a Directory in python ?

In this article we will discuss different APIs in python to create directories. Creating a Directory in Python Python’s OS module provides a function to create a directory i.e. Advertisements os.mkdir(path) It creates a directory with given path i.e. os.mkdir(‘tempDir’) It creates the directory ‘tempDir’ in current directory. Frequently Asked: Find the smallest file in …

How to create a Directory in python ?Read More

How to change current working directory in python ?

In this article we will discuss how to change the current working directory in python. Current working directory is the directory in which program is running. Advertisements Change Current Working Directory in Python First of all we need to import python’s os module i.e. import os Python’s os module provides a function to change the …

How to change current working directory in python ?Read More

Python : How to get list of files in directory and sub directories

In this article we will discuss different methods to generate a list of all files in directory tree. Creating a list of files in directory and sub directories using os.listdir() Python’s os module provides a function to get the list of files or folder in a directory i.e. Advertisements os.listdir(path=’.’) It returns a list of …

Python : How to get list of files in directory and sub directoriesRead More

Python : How to delete a directory recursively using shutil.rmtree()

In this article we will discuss how to delete an empty directory and also all contents of directory recursively i.e including contents of its sub directories. Delete an empty directory using os.rmdir() Python’s os module provide a function to delete an empty directory i.e. Advertisements os.rmdir(pathOfDir) Path of directory can be relative or absolute. It …

Python : How to delete a directory recursively using shutil.rmtree()Read More

Python: How to create a zip archive from multiple files or Directory

In this article we will discuss how to create a zip archive from selected files or files from a directory based on filters. Python’s zipfile module provides a ZipFile class for zip file related stuff. Let’s use this to create a zip archive file. Advertisements First import the class from module i.e. from zipfile import …

Python: How to create a zip archive from multiple files or DirectoryRead More

Cart

Your Cart is Empty

Back To Shop