#1 2019-08-24 22:36

exploid
Member
Registered: 2019-08-23
Posts: 14

Folder Creation by csv

Hello is it Possible to use that System to Create Folders from an CSV File ?

Offline

#2 2019-08-25 12:09

den4b
Administrator
From: den4b.com
Registered: 2006-04-06
Posts: 3,440

Re: Folder Creation by csv

Can you provide an example?

You can import the list of old and new names from CSV file via the Export options just above the Files table. Have you tried it?

Offline

#3 2019-08-25 12:12

exploid
Member
Registered: 2019-08-23
Posts: 14

Re: Folder Creation by csv

ye i can Our CSV Files containes Content like "1025251989;Teller Rund 30cm;W00012354987;Teller Rund 30cm *GESP*"
The best Option is an Software like yours who read the CSV Entry´s and you can modify it like in your software to Add New Folders.

For me i want To Create the Folders like "10-2525-1989 - W00012354987 - Teller Rund 30cm"

Thats the Reason why i need an software or Option to Create Folders

No i dont have try that for one Reason i need an Modify Option

Last edited by exploid (2019-08-25 12:15)

Offline

#4 2019-08-25 12:32

den4b
Administrator
From: den4b.com
Registered: 2006-04-06
Posts: 3,440

Re: Folder Creation by csv

I can't understand you unfortunately...

Can you explain it in your native language, and perhaps either Google Translate or other forum members might be able to understand it better?

Offline

#5 2019-08-25 12:42

exploid
Member
Registered: 2019-08-23
Posts: 14

Re: Folder Creation by csv

Our CSV files contain content such as "1025251989; Platter 30cm; W00012354987; Platter 30cm * GESP *"
it should create folders that look like this "10-2525-1989 - W00012354987 - Plate Round 30cm"

For this I need an option to modify the entries of the CSV according to a certain schema as it is in Renamer software renaming yes already.

btw. its Google Translator

Last edited by exploid (2019-08-25 13:16)

Offline

#6 2019-08-25 13:35

den4b
Administrator
From: den4b.com
Registered: 2006-04-06
Posts: 3,440

Re: Folder Creation by csv

The conversion from "1025251989; Platter 30cm; W00012354987; Platter 30cm * GESP *" to "10-2525-1989 - W00012354987 - Plate Round 30cm" can be accomplished using Regular Expressions. You can do this either in Excel, ReNamer, and even a text editor such as Notepad++, but the syntax will differ slightly between the applications.

Then, if you just want to create empty folders according the names in your CSV file, you can write a custom script, for example, in PowerShell, Python, PHP, etc.

This task does not appear to fall into the use cases of ReNamer.

Offline

#7 2019-08-25 13:39

exploid
Member
Registered: 2019-08-23
Posts: 14

Re: Folder Creation by csv

Ok Thank you

Offline

#8 2019-08-25 14:26

Stefan
Moderator
From: Germany, EU
Registered: 2007-10-23
Posts: 1,161

Re: Folder Creation by csv

You can use the scripting capabilities of your Operating System, for example VBScript.

As this is not really the task of a file "re-namer", you just have to ask in the right forum, like Stack Overflow f.ex.

Her is an example what I mean by utilizing VBS (ReNamer and PascalScript together with den4bs' build-in functions
should work also, I have to take a look the next week, if I got some free time...)

- - -

FROM File "LIST.CSV" with content:
1025251989; Platter 30cm; W00012354987; Platter 30cm * GESP *
1025251990; Platter 40cm; W00012354988; Platter 40cm * GESP *
1025251991; Platter 50cm; W00012354989; Platter 50cm * GESP *

TO new folders:
10-2525-1989 -  W00012354987 -  Platter 30cm\
10-2525-1990 -  W00012354988 -  Platter 40cm\
10-2525-1991 -  W00012354989 -  Platter 50cm\


Have your CSV (here named "LIST.CSV") and the below VBS file in one folder.
Execute the script witch reads the content of the CSV, take each line, split them up into parts,
format that parts and create a new string as input for the create folder command.

The VBS code:

SET FSO	= CreateObject("Scripting.FileSystemObject")
Const ForReading = 1 : Const ForWriting=2 : Const ForAppending=8

strInputFile = "LIST.CSV"

If  FSO.FileExists(strInputFile) Then
    Set oTextStream = FSO.OpenTextFile(strInputFile,ForReading)
    Do Until oTextStream.AtEndOfStream

        strLine = oTextStream.ReadLine	
        'MsgBox strLine
        If(strLine<>"") Then
            LinePartsArray = Split(strLine,";")
            E = LinePartsArray(0) 'Eins One
            Z = LinePartsArray(1) 'Zwei Two
            D = LinePartsArray(2) 'Drei Three
            V = LinePartsArray(3) 'Vier Four
            'MsgBox E &" -- "& Z  &" -- "& D  &" -- "& V

            '//FROM: "1025251989; Platter 30cm; W00012354987; Platter 30cm * GESP *"
            '//TO  : "10-2525-1989 - W00012354987 - Plate Round 30cm"

            E1 = left(E,2)
            E2 = mid(E,3,4)
            E3 = right(E,4)
            E4 = E1&"-"&E2&"-"&E3
            'MsgBox E4

            V2 = replace(V,"* GESP *","")

            OUT = E4 &" - "& D &" - "& V2
            'MsgBox OUT
            If Not FSO.FolderExists(OUT) Then FSO.CreateFolder OUT
        End If

    Loop
    oTextStream.Close
    MsgBox "Done"
Else
    MsgBox "E R R O R:  Input file 'strInputFile' not found"
    WScript.Quit
End If



HTH? big_smile


Read the  *WIKI* for HELP + MANUAL + Tips&Tricks.
If ReNamer had helped you, please *DONATE* to Denis or buy a PRO license. (Read *Lite vs Pro*)

Offline

#9 2019-08-25 17:35

exploid
Member
Registered: 2019-08-23
Posts: 14

Re: Folder Creation by csv

Thank you very much you are my hero smile

Offline

Board footer

Powered by FluxBB