streetmedic Posted October 2, 2018 Posted October 2, 2018 Im kinda new to this section and I noticed its confusing figuring out what to put where in what folder and what do i add to show on menu. Then where do i put this cmd to play in android. ect ect . I hope you get my gist of my sentence. But i was thinking has anybody made a script that auto reads any files dropped into a folder and basically writes the cmd to say the finished output?.. Example like this I drop a dloaded say file that has the roms and media in the proper structures and upon adding the files i know i am gonna need to add something to my menu to show the new game i added.... So i can See it now that i added my pack.. A auto menu maker? a script that reads what you dropped and what steps have to be complete said... .xml or .ini to make it run? would something like this work 0down vote The easiest way to do this is: to start i think is or am i way off line in my thinking? open Notepad copy [CTRL + C] this line: ECHO | SET /R=Rom Name.xml | CLIP paste [CTRL + V] this line to Main Menu.xml or Main Menu Android.xml and change "Rom Name.xml" for your text, then save it as "filename".bat And you can edit this copied text whenever you want just edit this file with Notepad. IS this feasable guys and if it can be done is it allowed withis hyperspin? found some ideas here in my reading? and put to paper today so since nobody really has offered a input yet i was hoping that i get some input other than 1 reply not so much help i was hoping for this is what i done so far and its just a start but its forming to the end path in theory. So in my writing something along the start of what i suppose to accomplish this is what i have written so far to make my idea maybe more understandable here you go for the ones that i hoped to input into my topic, stars to form my ideas Please don'trip this i am making public once i am done at least let me finish the idea for all to use Programming is like sex. One mistake and you have to support it for the rest of your life. – Michael Sinz XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX Sometimes it is necessary to check whether a file exists in a certain folder. Batch scripting provides a programmer with a really nice construction called 'If Exist'. It's pretty useful when you want to check for existence of a given file, for example, 'autoexec.bat'. To check for it, you should write the following code: If Exist autoexec.bat Echo Autoexec.bat exists!ut if you try to check for existence of any files in the way described above, you'll be surprised. Written '*.*', you'll be notified about existing files anyway, even when there are no files in the given folder. So instead of using '*.*' in 'if exist', it's better to look at the following code: @Echo Off For %%a In (1\*.*) Do Call :File_Ex %%a If Defined FileExist Echo Exist Goto :EOF :File_Ex Set FileExist=Yes Goto :EOF This code will give you proper answer about files in the specified folder, and I hope this can be included or maybe not include it into your own batch scripts. XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX Sorting Files into the wanted sections The task is to sort the archive of different Docs and files. There is a plenty (about 5 thousands) of files named the following way: number(3-6 digits)_name_.zip(jar,rar) And the same amount of images in 'media' folder: number(3-6 digits).jpg(gif,png,flv,mp4) Alse there are .ini files in 'ini' folder or such examples number(3-6 digits).ini(ini) may have numbers as the sometimes do Is it possible to write a batch script that creates folders named after a file and move there a file, a picture and a ini files? ZIP archive should be also extracted there. The batch script to solve this task looks like this: @Echo Off Set ArcDir=c:\archives Set ScreenDir=c:\screens images or misc just to show poss ideas... #mightneed to fix line here Set HyperspinDir=c:\Hyperspin Set DatabasesDir=c:\Hyperspin\Database Set DocsDir=c:\Hyperspin\Docs Set EmulatorsDir=c:\Hyperspin\Emulators Set HyperlistDir=c:\Hyperspin\Hyperlist Set HyperSpinDir=c:\Hyperspin\HyperSpin Set HyperSync CloudDir=c:\Hyperspin\HyperSync Cloud Set HyperThemeDir=c:\Hyperspin\HyperTheme Set JoyToKeyDir=c:\Hyperspin\JoyToKey Set MediaDir=c:\Hyperspin\Media Set ModulesDir=c:\Hyperspin\Modules Set RocketLauncherDir=c:\Hyperspin\RocketLauncher Set RomsDir=c:\Hyperspin\Roms Set ScriptsDir=c:\Hyperspin\Scripts Set SettingsDir=c:\Hyperspin\Settings Set ToolsDir=c:\Hyperspin\Tools Set Settings_AndroidDir=c:\Hyperspin\Settings_Android Set OutDir=C:\ For %%A In (%ArcDir%\*.zip %ArcDir%\*.jar %ArcDir%\*.rar) Do ( md "%%~nA">Nul 2>&1 If /I "%%~xA"==".zip" ( pkzip -extr=up "%%A" "%OutDir%\%%~nA">Nul 2>&1 ) Else ( Copy /y "%%A" "%OutDir%\%%~nA">Nul 2>&1 ) Copy /y "%HyperspinDir%\%%~nA.*" "%OutDir%\%%~nA">Nul 2>&1 Copy /y "%HyperspinDir%\%%~nA.*" "%OutDir%\%%~nA">Nul 2>&1 Copy /y "%DocsDir%\%%~nA.*" "%OutDir%\%%~nA">Nul 2>&1 Copy /y "%EmulatorsDir%\%%~nA.*" "%OutDir%\%%~nA">Nul 2>&1 Copy /y "%HyperlistDir%\%%~nA.*" "%OutDir%\%%~nA">Nul 2>&1 Copy /y "%HyperSpinDir%\%%~nA.*" "%OutDir%\%%~nA">Nul 2>&1 Copy /y "%HyperSync CloudDir%\%%~nA.*" "%OutDir%\%%~nA">Nul 2>&1 Copy /y "%HyperThemeDir%\%%~nA.*" "%OutDir%\%%~nA">Nul 2>&1 Copy /y "%JoyToKeyDir%\%%~nA.*" "%OutDir%\%%~nA">Nul 2>&1 Copy /y "%MediaDir%\%%~nA.*" "%OutDir%\%%~nA">Nul 2>&1 Copy /y "%ModulesDir%\%%~nA.*" "%OutDir%\%%~nA">Nul 2>&1 Copy /y "%RocketLauncherDir%\%%~nA.*" "%OutDir%\%%~nA">Nul 2>&1 Copy /y "%RomsDir%\%%~nA.*" "%OutDir%\%%~nA">Nul 2>&1 Copy /y "%ScriptsDir%\%%~nA.*" "%OutDir%\%%~nA">Nul 2>&1 Copy /y "%SettingsDir%\%%~nA.*" "%OutDir%\%%~nA">Nul 2>&1 Copy /y "%ToolsDir%\%%~nA.*" "%OutDir%\%%~nA">Nul 2>&1 Copy /y "%Settings_AndroidDir%\%%~nA.*" "%OutDir%\%%~nA">Nul 2>&1 ) XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX Borrowed idea thanks to the poster of this it comes in handy so it my script but can be useful Have you got directories with thousands and thousands of unsorted files? Sure everyone has. I also have folder called 'Downloads' where I place almost everything downloaded from the Web. Usually I clear it once or twice per month and then start to fill it with 'digital garbage' again. But in this case I often lose gems among the garbage, that's this week I decided to sort files in 'Downloads' instead of removing them. I didn't want to lose my time and started to create the batch file which had to sort everything without my additional effort. I won't waste your time describing what I tried to do, just give you the code that was created after some experiments. @ECHO off REM Creating folders to separate files of different types IF not EXIST TXT MD TXT IF not EXIST AVI MD AVI IF not EXIST MP3 MD MP3 IF not EXIST JPG MD JPG IF not EXIST RAR MD RAR IF not EXIST HTM MD HTM IF not EXIST EXE MD EXE ECHO Moving text files MOVE /-Y *.txt TXT MOVE /-Y *.doc TXT MOVE /-Y *.rtf TXT MOVE /-Y *.PDF TXT ECHO Moving movies MOVE /-Y *.avi AVI MOVE /-Y *.mpg AVI MOVE /-Y *.divx AVI MOVE /-Y *.xvid AVI ECHO Moving audio MOVE /-Y *.mp3 MP3 MOVE /-Y *.wav MP3 MOVE /-Y *.ogg MP3 MOVE /-Y *.wma MP3 ECHO Moving images MOVE /-Y *.jpg JPG MOVE /-Y *.bmp JPG MOVE /-Y *.gif JPG MOVE /-Y *.png JPG ECHO Moving archives MOVE /-Y *.RAR RAR MOVE /-Y *.ZIP RAR MOVE /-Y *.gz RAR MOVE /-Y *.7z RAR ECHO Moving executables MOVE /-Y *.exe EXE ECHO Everything is sorted! PAUSE As far as you can see, this script is quite simple though it is long enough. This Flag '/-Y' is added to avoid replacing one file existing in a target folder with a new file with the same name. Hope you'll find this script useful. XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
thatman84 Posted October 2, 2018 Posted October 2, 2018 I dont think anything has been done for this as it probably would not save any time. There is HyperHQ for the PC setup which creates all folders the .ini and edits the main menu xml for a new system. If your talking android I will move this post over to that forum. If your grabbing packs it really is just a case of putting the name into the main menu xml and setting your rompath in the ini....not sure a batch file is needed Official Hyperspin Tutorials Playlist HS Android Overview & Install HS Android Base Pack Download My Tutorials
streetmedic Posted October 3, 2018 Author Posted October 3, 2018 the batch was a example but Id like to as i add the files to a build if a part is not complete can it some how alert you to the missing files that your currently dropping in the build, and the example would auto populate the menu is kinda what i am after. I realize these tools are already there in parts with othertools but to me they are too many and very confusing just simplify the intial step add to many and toss aflad at the missing say menu graafic or missing emulator .. I hope this is making sence
streetmedic Posted October 3, 2018 Author Posted October 3, 2018 does this make a lil bit more understandable say your builds are not in place jumbled files missing pieces or mis aligned?.. id like to fix it as much in one pass to sort properly for me and all that runinto the messy files and roms ect ect..
thatman84 Posted October 3, 2018 Posted October 3, 2018 It’s a good idea. Just need someone to make it...good luck Official Hyperspin Tutorials Playlist HS Android Overview & Install HS Android Base Pack Download My Tutorials
streetmedic Posted October 3, 2018 Author Posted October 3, 2018 Well i am attempting it ,WE may or not succeed..
streetmedic Posted October 6, 2018 Author Posted October 6, 2018 On 10/2/2018 at 10:28 PM, thatman84 said: It’s a good idea. Just need someone to make it...good luck Its been Created I sent you the files to test This is a interesting feature of HyperDrop, because allow you to move your files in a destination directory, recreating the original folder structure. You can for example drag&drop a folder like: C:\[My Hyperspin] C:\Directory To move files from: C:\Directory\Subdirectory\File.txt To a new destination like: C:\Destination\Subdirectory\File.txt or like: C:\Destination\Directory\Subdirectory\File.txt As you can see, HyperDrop has recreated a portion of the path of your files (\Subdirectory or \Directory\Subdirectory). It works also with other actions like Copy, Compress, Extract and in general with all the actions that have a path as destination. You only need to use %SubDir% and/or %DroppedDirName% abbreviations in your destinations. For example, to move the files as described above, you will use these respective destination folders: C:\Destination\%SubDir% C:\Destination\%DroppedDirName%\%SubDir% Example Let's consider that I have a main Media folder that contains subfolders of music, movies and other stuff. I'm not very neat, so there are some subfolders that contain mp3, txt, doc, avi together. Now I want to extract only mp3 files from there, but I want to keep the folder structure, because subfolders have names like U2, REM, Taylor Swift, etc.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.