Getting and analysing file names
Anonymous
Not applicable
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2019-08-08
11:25 AM
- last edited on
2022-09-29
10:19 AM
by
Daniel Kassai
2019-08-08
11:25 AM
Hi,
Is it possible to get file names from within a user-chosen folder and analyse them? I want to be able to automatically create a new file name based on what files already exist within the folder I'm saving to. At a very basic level this would be to increase a number on the end of the file name based on whether there are already files of the same name in the folder.
Thanks
Is it possible to get file names from within a user-chosen folder and analyse them? I want to be able to automatically create a new file name based on what files already exist within the folder I'm saving to. At a very basic level this would be to increase a number on the end of the file name based on whether there are already files of the same name in the folder.
Thanks
Labels:
- Labels:
-
Add-On (C++)
2 REPLIES 2
Anonymous
Not applicable
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2019-08-09 11:47 AM
2019-08-09
11:47 AM
rCushing wrote:Sure, you can get paths/names of all files and folder at the provided location with IO library (Input Output). You can also use std library for it.
Hi,
Is it possible to get file names from within a user-chosen folder and analyse them?
Thanks
When you have it rest is string manipulation and passing modified name to save function.
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2019-08-09 01:14 PM
2019-08-09
01:14 PM
You could use IO::TreeEnumerator to get all the files in a specified directory (and optionally subdirectories). There's an example if this in use in the DG_Test project with the dev-kit (see the class FolderEnumerator ).
Ralph Wessel BArch
Central Innovation
Central Innovation