Search found 7 matches

by pelomero
26 May 2020 10:19
Forum: DOS Batch Forum
Topic: Create random folders and move files in them
Replies: 3
Views: 3747

Re: Create random folders and move files in them

I managed to modify the code above to move the extraction of the zip to the new created folder, by doing some debugging using echo. :mrgreen: powershell.exe -nologo -noprofile -command "& { Add-Type -A 'System.IO.Compression.FileSystem'; [IO.Compression.ZipFile]::ExtractToDirectory('!filepath!!n:~-2...
by pelomero
24 May 2020 06:34
Forum: DOS Batch Forum
Topic: Create random folders and move files in them
Replies: 3
Views: 3747

Re: Create random folders and move files in them

Thank you for the response. I've just tested it. 1- It just goes in a endless loop in creating folders and move it the zip file for each iteration; it treats the same file as a new file. So, for the file "file1.zip", after a couple of seconds of running the program, I get this :mrgreen: : "d:\Folder...
by pelomero
23 May 2020 23:32
Forum: DOS Batch Forum
Topic: Create random folders and move files in them
Replies: 3
Views: 3747

Create random folders and move files in them

Hello! The context: In a specific folder I have multiple zip files. I have a code which takes all the zip files in that folder and unpack them in separate folders The code: @echo off setlocal enableExtensions disableDelayedExpansion for /r "%cd%" %%a in ("*.zip") do powershell.exe -nologo -noprofile...
by pelomero
12 May 2020 04:55
Forum: DOS Batch Forum
Topic: Script that generates commands and run them
Replies: 5
Views: 5854

Re: Script that generates commands and run them

Thank you, thank you. Regarding the full path name and the name of the file, I've found some info regarding on how should I manipulate them, but I didn't manage to sort it out. I've got reference from here: https://stackoverflow.com/questions/659647/how-to-get-folder-path-from-file-path-with-cmd htt...
by pelomero
10 May 2020 00:35
Forum: DOS Batch Forum
Topic: Script that generates commands and run them
Replies: 5
Views: 5854

Re: Script that generates commands and run them

Hello to this wonderful community! Three more questions. (2 related to this topic, the third kinda of :D ) I hope it's okay I didn't open another topic. 1. I saw that in my first question, in order to remove the extension, penpen wrote "%%~dpna" . What do I need to write to add the string "-i" chara...
by pelomero
01 May 2020 06:00
Forum: DOS Batch Forum
Topic: Script that generates commands and run them
Replies: 5
Views: 5854

Re: Script that generates commands and run them

Yes, it's working. Thank you VERY MUCH.
by pelomero
01 May 2020 03:25
Forum: DOS Batch Forum
Topic: Script that generates commands and run them
Replies: 5
Views: 5854

Script that generates commands and run them

Hello Summay of my question: I want to generate commands and run them based on the files I find in the current folder and subfolders; the selection of the files need to be based on their extension. Example: On D:\Folder 1 D:\Folder 1\SubFolder D:\Folder 1\SubFolder\SubSubFolder I have lots of files....