Quantcast
Channel: First steps - JuliaLang
Viewing all articles
Browse latest Browse all 2795

Re-naming several folders

$
0
0

@samantp wrote:

Hi,
I am just getting started with Julia so apologies if this is too simple a question.
I have a series of directories (folders) with names as follows

6-ep2ddifftraDYNDIST-69284
7-ep2ddifftraDYNDISTMIX-61648
8-bfsfbsjahfa

etc.

Basically, a number, followed by a hyphen, followed by some gibberish (the gibberish has no consistency in length, value, or anything).
I want to rename all of these folders to just the number,
so for example
6-ep2ddifftraDYNDIST-69284 becomes 6
7-ep2ddifftraDYNDISTMIX-61648 becomes 7

etc.

So, how would I go about doing this? I am quite new so I don’t know which packages to use or even where to begin finding this out. I can loop through the folders and do something to the effect of name=StringName[0] but I am not sure where to find the packages to do this,

Thanks in advance!

Posts: 4

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 2795

Trending Articles