|
Answer» Hi there, I have 3 directories on c:drive: folde1, folde2 and folder, which each folder has different funktion. a.exe will run succesfull if "folder" name exist.
If I want to test folde1 rename c:\folder folder3 clear rename c:\folde1 folder echo -- run a.exe -- a.exe
After test folde1, let say I want to test folde2 rename c:\folder (back to ORIGINAL name) folde1 clear rename c:\folde2 folder echo -- run a.exe -- a.exe
and so on Every time I have to look C:drive where I am now: folder from folde1 or folder from folde2 or folder from folde3
Is possible to make it automatic and create batch file "autoexec.bat"?
Any help? thanks If I understand correctly, you are typing those commands into command prompt and wish to create a batch file to automatically run (at what time?)
I don't recognize 'clear' To check if a folder exists you want to use 'if exist FolderName Command' To check if a folder does not exist you use 'if not exist FolderName Command'
so if you want to check if a folder named "Folde1" exists, and execute a.exe only if the folder is there, you would have something like: 'if exist Folde1 start a.exe'
If you want it to run on startup, place a shortcut into the startup folder In Windows 7: (%appdata%\Microsoft\Windows\Start Menu\Programs\Startup)@Lemonilla Thanks for the quick response.
It is only msdos that run in ram memory booted from FLASH drive. All the files & directories are inside the flash drive (Nothing to do with internal HD or windows system). I am trying to reduce the problems and just limit of 2 directories only: folder and folde1 This is my logical thinking for autoexec.bat, it will work but I dont know how to write the script in msdos.
==>Boot dos to test folde1: if c:\folde2 exist do c:\a.exe else rename c:\folder folde2 clear rename c:\folde1 folder do c:\a.exe
==>boot dos to test folder: if c:\folde1 exist do c:\a.exe else rename c:\folder folde1 clear rename c:\folde2 folder do c:\a.exe
What do you think, is it possible to create autoexec.bat? ThanksWhat version of MSDOS is it? In MSDOS you cannot rename directories.
Explain what you want to do (not what commands you think will work).@foxidrive DOS version 4.10.2222 This is my autoexec.bat tested and worked ok, but I dont know how to make if condition(s) script work:
rename c:\folder folde2 clear rename c:\folde1 folder clear c:\a.exe
ThxThis should let you rotate the folders - is that what you want to do?
I don't know what 'clear' does. The screen clear command is CLS
Code: [Select]@echo off rename c:\folde abc rename c:\folder1 folde rename c:\folder2 folder1 rename c:\folder3 folder2 rename c:\abc folder3 c:\a.exe Thank you very much for your help. Without your idea may my batch file never work.
It works fine on my test. http://www.youtube.com/watch?v=-SWBeX8Khlc
DOS doesnt support a file BIGGER than 4 Gb. NTFS4DOS can read/write on NTFS, but it can not be automatic, because every time I have to type "yes" to agree and punch enter. Is there a magic program to make it automatic? or MAYBE you know similar freeware tools like ntfs4dos?
Thank you very much! This sort of thing works in some cases. Assuming you are typing the whole word 'yes'
echo yes|ntfsdos commands
or echo yes>yes.txt ntfsdos commands del yes.txt@foxidrive Ntfs4dos can not be use for my build. There is c: drive, but no file found. Thanks for your script, hope I can use it one day.
|