Create Directory with Multiple subs?
Create Directory with Multiple subs?
Hi.. .wondering if someone can lead me down the right path.... I want to create a button that will:
a) ask the user for a folder name (ie: Marybeth) And then
1 - create the folder in a specific path (ie: G:\clients\Marybeth)
2 - change to that new directory and create 3 fixed subdirectories (ie: G:\clients\Marybeth\Images, \Text, \Previews)
Thus, at the end of the click, there would be a new G:\clients folder with the 3 subfolders.... I got part way into this but not any further. Thx!
a) ask the user for a folder name (ie: Marybeth) And then
1 - create the folder in a specific path (ie: G:\clients\Marybeth)
2 - change to that new directory and create 3 fixed subdirectories (ie: G:\clients\Marybeth\Images, \Text, \Previews)
Thus, at the end of the click, there would be a new G:\clients folder with the 3 subfolders.... I got part way into this but not any further. Thx!
Re: Create Directory with Multiple subs?
And your "part way" looks like?...
One of my scripts helped you out? Please donate via Paypal
Re: Create Directory with Multiple subs?
I was able to get the input box to appear and create the new folder....
But - I was not able to force it to a specific path (ie: G:\clients) nor could I find the chg directory command... thx for your advice!
Code: Select all
input $name, "Enter the name of the new folder to create";
new "<curpath>\$name", dir;
Re: Create Directory with Multiple subs?
This is way off...
Code: Select all
$dstPath = "R:\test";
$subFolders = "Images|Text|Previews";
$folderName = input("Enter the desired folder name");
if ($folderName) {
foreach($subFolder, $subFolders, , "e") {
new("$dstPath\$folderName\$subFolder", "dir");
}
goto "$dstPath\$folderName";
}
One of my scripts helped you out? Please donate via Paypal
Re: Create Directory with Multiple subs?
Thx HighEnd... that did the trick. Appreciate the time.....
Re: Create Directory with Multiple subs?
bonjour,
je veux créer plusieur répertoire suivant une liste connue, et à l'interieur de c'est répertoire je veux faire des sous dossiers spécifique.
CORDIALEMENT
je veux créer plusieur répertoire suivant une liste connue, et à l'interieur de c'est répertoire je veux faire des sous dossiers spécifique.
CORDIALEMENT
Re: Create Directory with Multiple subs?
Welcome to the forum.
As the number of French speaking forum members is certainly less than the English speaking ones, you will get more replies if you manage to post in English.
As the number of French speaking forum members is certainly less than the English speaking ones, you will get more replies if you manage to post in English.
Ralph
(OS: W11 22H2 Home x64 - XY: Current beta - Office 2019 32-bit - Display: 1920x1080 @ 125%)
(OS: W11 22H2 Home x64 - XY: Current beta - Office 2019 32-bit - Display: 1920x1080 @ 125%)
Re: Create Directory with Multiple subs?
Ok Thanks
I want a lisp to create several directories according to a known list, and inside this directory I want to make specific sub-folders.
thank you
Re: Create Directory with Multiple subs?
Menu - Edit - New - New Folders?
One of my scripts helped you out? Please donate via Paypal
Re: Create Directory with Multiple subs?
Check out the script above by highend and adapt it to your needs.
Ralph
(OS: W11 22H2 Home x64 - XY: Current beta - Office 2019 32-bit - Display: 1920x1080 @ 125%)
(OS: W11 22H2 Home x64 - XY: Current beta - Office 2019 32-bit - Display: 1920x1080 @ 125%)
Re: Create Directory with Multiple subs?
but the problem is how to make several directories, the script gives me only one directory to do, because I have a list of directories, and I want to do it once without starting the script each time to do one directory.
Re: Create Directory with Multiple subs?
Maybe you provide an excerpt of folders including their subfolders you want to create?
One of my scripts helped you out? Please donate via Paypal
Re: Create Directory with Multiple subs?
hello highend,highend wrote: ↑26 May 2019 00:27 This is way off...
Code: Select all
$dstPath = "R:\test"; $subFolders = "Images|Text|Previews"; $folderName = input("Enter the desired folder name"); if ($folderName) { foreach($subFolder, $subFolders, , "e") { new("$dstPath\$folderName\$subFolder", "dir"); } goto "$dstPath\$folderName"; }
1. is it possible to name subfolders as folder with yeasteday, folder with today and folder with tomorrow date? i.e 2020-06-21, 2020-06-22, 2020-06-23. folder names to change dynamically.
2. i want a new folder with today's date to be created in the above folder path automatically and daily. the moment i start xyplorer, folder with todays date to be created.
Re: Create Directory with Multiple subs?
Sure, look at
datediff()
/ formatdate()
and the date variable...One of my scripts helped you out? Please donate via Paypal
Re: Create Directory with Multiple subs?
see the attached file
for example :
I) parent file: P18943
1) Sub-folder 1: "Enquête Parcellaire"
2) Subfolder 2: "Enquête Juridique".
moreover I want to drag files which have the same prefix as the Parent folder, in the sub-folder created "Enquête Parcellaire" ex:
P18943-PV.pdf
P18943-Minute-PV.pdf
P18943-Plan.pdf
P18943-ZN2.pdf
P18943-Plan.dxf
In short, the goal is to create the parent folder with the same name as the files and drag all the files with the same name (ex: P18943-.... etc. or
P18944 -.... etc, Or...etc) let's choose sub-folder 1: "Enquête Parcellaire".
Thank you for your help
- Attachments
-
- capture1.JPG (30.37 KiB) Viewed 3387 times