Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: *Solved* (CD Rules) Changing the file type of files in subfolders  (Read 14639 times)

0 Members and 1 Guest are viewing this topic.

contrex

  • Guest
Re: Changing the file type of files in subfolders
« Reply #15 on: August 26, 2007, 12:41:54 AM »
Next I would create another 'master' .bat file

No pun intended?


Dusty



    Egghead

  • I could if she would, but she won't so I don't.
  • Thanked: 75
  • Experience: Beginner
  • OS: Windows XP
Re: *3/4 Solved* Changing the file type of files in subfolders
« Reply #16 on: August 26, 2007, 01:36:39 AM »
Oh dear, I will have to pull myself together, I missed that one but then have had a few g&t's.

One good deed is worth more than a year of good intentions.

contrex

  • Guest
Re: *3/4 Solved* Changing the file type of files in subfolders
« Reply #17 on: August 26, 2007, 01:55:59 AM »
Oh dear, I will have to pull myself

Oh dear indeed!

I mentioned it because of the OP's mention of hiding files so that "littles" didn't see them. I am not actually sure if we should be encouraging this sort of thing...


Dusty



    Egghead

  • I could if she would, but she won't so I don't.
  • Thanked: 75
  • Experience: Beginner
  • OS: Windows XP
Re: *3/4 Solved* Changing the file type of files in subfolders
« Reply #18 on: August 26, 2007, 02:39:34 AM »
This will get out of hand shortly - c'mon mods, lock us up..
One good deed is worth more than a year of good intentions.

contrex

  • Guest
Re: *3/4 Solved* Changing the file type of files in subfolders
« Reply #19 on: August 26, 2007, 02:43:48 AM »
This will get out of hand shortly - c'mon mods, lock us up..

Before we go blind...


DeltaSlaya



    Apprentice
  • Google
    Re: *3/4 Solved* Changing the file type of files in subfolders
    « Reply #20 on: August 26, 2007, 02:47:26 AM »
    Using batch in this way to hide files is just stupid. If you really must hide the files then here is a batch that may help:

    http://www.lytebyte.com/2007/06/25/how-to-lock-and-hide-folders-in-windows-without-additional-software/
    System specs:
    Intel Core 2 Duo E6600 (up to 3.3 stock V and air)
    ASUS Striker Extreme
    XFX 8600GT XXX Edition
    2x 1gB Corsair XMS2 DDR2-800
    Seagate Barracuda 320gB SATA
    Raidmax Ninja 918 (520W ATXV2.0 PSU)
    -

    contrex

    • Guest
    Re: *3/4 Solved* Changing the file type of files in subfolders
    « Reply #21 on: August 26, 2007, 03:08:37 AM »
    Of course I never have any material on my computer that I don't want anybody else to know about.

    (Why does he want to hide mp3s? mp3s??? The mind boggles.)

    But if I did I would rar them up into archives, with uninformative names such as X1234.rar and then remove the .rar extension so that a double click in Explorer would merely bring up the "unknown file type" dialog. This would not be a problem because I would know what they are, and also because rar.exe, the command line DOS executable that comes with WinRAR, does not care about extensions as long as you use wildcards. Let me clarify that. The command rar.exe e X1234 would fail with the message "Cannot open X1234.rar The system cannot find the file specified." even though X1234.rar does not exist. For a single, specified file, rar.exe adds the extension internally and then can't find the archive thus named because it does not exist. However, the command  rar.exe e *.* will merrily extract from any rar archives it finds, whether or not they have an extension (and, if they do, whatever the extension is!)


    NDog

    • Guest
    Re: *3/4 Solved* Changing the file type of files in subfolders
    « Reply #22 on: August 26, 2007, 05:21:39 AM »
    I just love it how people say don't do that its stupid, just do something else. It never fails to amaze me. Anyway I see you are writing a batch file because its fun and something you can be proud of thats why you call it a pet project which is just that. So I will write this script for you since I am interested in what you are doing, although I will help you approach this from a different approach

    First we will bring up a menu which allows you to chose
    1)Hide
    2)Unhide

    Secondly the filetypes you are hiding will be set variables at the script start and also their equvalent renamed extensions

    Thirdly we will make use of the FOR command which allows you to process all files and sub-directories


    The concept script so far is going to look like this
    Code: [Select]
    set filex1=gif
    set filexr1=mp3

    echo Hide
    echo Unhide

    if choice = hide set option = filex1 else set option = filexr1

    for /f in %%g (dir/b *.filex1) do ren %%g %filex1%




    contrex

    • Guest
    Re: *3/4 Solved* Changing the file type of files in subfolders
    « Reply #23 on: August 26, 2007, 05:40:06 AM »
    I just love it how people say don't do that its stupid, just do something else. It never fails to amaze me.

    I just love it when cocky little sods with 10 posts under their belts feel entitled to lecture their elders and betters with over 470 posts. It never fails to amaze me.

    Especially when their "concept script" is riddled with elementary errors.







    Dusty



      Egghead

    • I could if she would, but she won't so I don't.
    • Thanked: 75
    • Experience: Beginner
    • OS: Windows XP
    Re: *3/4 Solved* Changing the file type of files in subfolders
    « Reply #24 on: August 26, 2007, 12:22:46 PM »

    I am using Windows XP Home, and i really would like to not use anything that has to be downloaded.

    The point of this program is to Change the type so they are unreadable and hide images of the .jpg, .gif, and .png type

    ......

    I have been messing with Batch programing since yesterday so if any one has any other suggestions i would really like them.


    ok so i was looking at a CD info, and i couldnt understand it

    I want to have a way to just use the hider in every subfolder of a folder with one launch of a program, i am fine with it making other programs in each of the folders go off too.


    Using batch in this way to hide files is just stupid. If you really must hide the files then here is a batch that may help:

    ...


    Stupid ???   We have an OP who does not want to use anything gleaned from the WWW, has been 'messing' with batch programming for two days and who can't understand the CD command info.  That surely indicates just a little lack of experience.   So what happens?  The Op is told that using a batch script to hide files as the OP wishes to do is stupid then offered a script on the WWW.

    Sure, the OP's coding is a tad on the raw side and the coding I suggested is a tad crude but hey, didn't we all start out with very rough edges?   Whatever happened to nudging newbies along to achieve what they want and how they want to get there then suggesting possible improvements?

    I have no doubt that the OP will get his script to run as he wishes then go on to improve it over time and eventually arrive at Encryption/Password Protection/etc...

    BTW I don't know why the OP doesn't just burn the folders to dvd or cd or copy them to a flash drive and delete them from his hdd to keep them out of sight/hearing of his littles.  But then that's not what he wants to do.


    K.I.S.S.
    One good deed is worth more than a year of good intentions.

    Sir.Laggalot

    • Guest
    Re: *3/4 Solved* Changing the file type of files in subfolders
    « Reply #25 on: August 26, 2007, 02:38:55 PM »
    Stupid ???   We have an OP who does not want to use anything gleaned from the WWW, has been 'messing' with batch programming for two days and who can't understand the CD command info.  That surely indicates just a little lack of experience.   So what happens?  The Op is told that using a batch script to hide files as the OP wishes to do is stupid then offered a script on the WWW.

    Sure, the OP's coding is a tad on the raw side and the coding I suggested is a tad crude but hey, didn't we all start out with very rough edges?   Whatever happened to nudging newbies along to achieve what they want and how they want to get there then suggesting possible improvements?

    I have no doubt that the OP will get his script to run as he wishes then go on to improve it over time and eventually arrive at Encryption/Password Protection/etc...

    BTW I don't know why the OP doesn't just burn the folders to dvd or cd or copy them to a flash drive and delete them from his hdd to keep them out of sight/hearing of his littles.  But then that's not what he wants to do.


    K.I.S.S.

    Thank you for this ^

    I am now using the locker code to hide said files, but...

    I am still having fun making a batch to hide files like crazy. I am now working on adding the locker to the master hider i now have which will set off all the conceal bats i have in the folders.

    And I totally agree with Dusty, I may be new to Batch codes but in other fields i am far from new, and when you are better then some one you should help them do what they thought of and then remark to them ways to improve it.

    I am happy with my progress, the original code from day one for my hider was as such... (which i wrote my self)

    This is Program one to hide the files (or as it was here, to convert them)

    @ ECHO OFF

    title Hiding Program

    ECHO.
    ECHO This program will change the format of any images in this folder.
    ECHO Make sure you don't have any .mp3, .mp4, or .avi files in this folder.
    ECHO.
    ECHO.

    PAUSE
    CLS

    ECHO.
    ECHO Are you sure?
    ECHO.
    ECHO.

    PAUSE

    rename *.jpg *.mp3
    rename *.gif *.mp4
    rename *.png *.avi

    REM Sir.Laggalot


    And here is the program to return it back

    @ ECHO OFF

    title Fix Program

    ECHO.
    ECHO This program will reverse the effects of Hide.bat
    ECHO.
    ECHO.

    PAUSE
    CLS

    ECHO.
    ECHO Are you sure?
    ECHO.
    ECHO.

    PAUSE

    rename *.mp3 *.jpg
    rename *.mp4 *.gif
    rename *.avi *.png

    REM Sir.Laggalot




    Very crude and very rough, but as you can see i have improved a lot since then.

    Of course I never have any material on my computer that I don't want anybody else to know about.

    (Why does he want to hide mp3s? mp3s??? The mind boggles.)

    But if I did I would rar them up into archives, with uninformative names such as X1234.rar and then remove the .rar extension so that a double click in Explorer would merely bring up the "unknown file type" dialog. This would not be a problem because I would know what they are, and also because rar.exe, the command line DOS executable that comes with WinRAR, does not care about extensions as long as you use wildcards. Let me clarify that. The command rar.exe e X1234 would fail with the message "Cannot open X1234.rar The system cannot find the file specified." even though X1234.rar does not exist. For a single, specified file, rar.exe adds the extension internally and then can't find the archive thus named because it does not exist. However, the command  rar.exe e *.* will merrily extract from any rar archives it finds, whether or not they have an extension (and, if they do, whatever the extension is!)

    If you read the code, it hides jpgs as mp3s not the other way around, (although it could easily be changed)

    And if i were to hide it in a rar like that, (not easily accessible), I would rar the folder and then change it to a jpg file and attach a Picture to it so you could open it as the image and see said image.

    Sir.Laggalot

    • Guest
    Re: *3/4 Solved* Changing the file type of files in subfolders
    « Reply #26 on: August 26, 2007, 02:45:51 PM »
    Oh and Dusty what i ment and why i made this 3/4 solved is i would still like a way to make the bat find the other bats without me having to code them in.

    An Example would be

    I make a new folder and toss the hider program into it with the images. Now i run the master hider program which would search all the subfolders for hider.bat files and activate them.

    Right now i would have to add the hider.bat to the folder and then add the folders path to the master.bat file, which btw works perfectly and i also figured out a way to add new folders easily so it isnt to much trouble.

    Dusty



      Egghead

    • I could if she would, but she won't so I don't.
    • Thanked: 75
    • Experience: Beginner
    • OS: Windows XP
    Re: *3/4 Solved* Changing the file type of files in subfolders
    « Reply #27 on: August 26, 2007, 03:17:42 PM »
    Sir.Laggalot - thank you for your comments.

    I'm a bit confused as to why you need to have the conceal script in every folder when you could Call the .bat file but that's up to you.   Obviously you are progressing with your pet project and I look forward to your announcement of total success.

    Cheers.
    One good deed is worth more than a year of good intentions.

    Sir.Laggalot

    • Guest
    Re: *3/4 Solved* Changing the file type of files in subfolders
    « Reply #28 on: August 26, 2007, 03:23:10 PM »
    My brain is right now in the middle of conceiving the concept of what i can do with CD, Thank you so much.

    I just used it to let the locker program make the locker in a different folder, and i have put both the master hider program and the locker program together, and i am thinking about putting the hider program into the master aswell.

    If i where to do that i would have to repeat the script of it for each folder but it will reduce the number of files...

    Should i, or should i keep it as 2 programs on using the other.

    Dusty



      Egghead

    • I could if she would, but she won't so I don't.
    • Thanked: 75
    • Experience: Beginner
    • OS: Windows XP
    Re: *3/4 Solved* Changing the file type of files in subfolders
    « Reply #29 on: August 26, 2007, 05:18:11 PM »

    Should i, or should i keep it as 2 programs on using the other.


    I really don't know - sorry.  Why not do it both ways to compare efficiency then retain the one you believe is best for your purpose?

    A reason I have all .bat files in one folder and have that folder in my Path is so that I can Call the files from anywhere in my file system.   One file I use for selective backup is called from several locations.   But that's just the way I prefer to do it, whether it's the most efficient method or would have the approval of the scripting gurus is open to argument but it has served me well for some time.   As you progress with scripting you will write and understand more complex scripts and, no doubt, come to wonder why your earlier coding was so basic but I think that right now the KISS principle should apply.

    Apologies if that sounds patronizing, it's not meant to be.

    One good deed is worth more than a year of good intentions.