@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 follows6-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 7etc.
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